246162026-02-13 07:39:34tasfeketeBimmbamm (30)cpp17Wrong answer 3/302ms508 KiB
#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
string v[1000];
int n,a=0;
bool b=1;
int main()
{
    cin>>n;
    for(int i=1 ; i<=n ; i++){
        cin>>v[i];
    }
    for(int i=1 ; i<=n && b; i++){
        if(i%3==0 && i%5!=0 && v[i]!="BIMM"){
            a=i;
            b=0;
        }
        else if(i%5==0 && i%3!=0 && v[i]!="BAMM"){
            a=i;
            b=0;
        }
        else if(i%5==0 && i%3==0 && v[i]!="BUMM"){
            a=i;
            b=0;
        }
        else if(v[i]!="SZAM"){
            a=i;
            b=0;
        }
    }
    cout<<a;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Wrong answer0/02ms316 KiB
2Runtime error0/02ms508 KiB
3Wrong answer0/32ms316 KiB
4Wrong answer0/32ms316 KiB
5Accepted3/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Runtime error0/31ms364 KiB
11Runtime error0/31ms508 KiB
12Runtime error0/32ms316 KiB