125452024-12-21 17:54:52MrkzBimmbamm (30)cpp17Wrong answer 3/302ms508 KiB
#include <iostream>
#include <cstring>
using namespace std;
char a[1000];
int megoldas,n;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a;
        if(i%3==0 && i%5!=0 && strstr(a,"BIMM")==NULL && megoldas==0)
            megoldas=i;
        else if(i%3!=0 && i%5==0 && strstr(a,"BAMM")==NULL && megoldas==0)
            megoldas=i;
        else if(i%3==0 && i%5==0 && strstr(a,"BUMM")==NULL && megoldas==0)
            megoldas=i;
        else if(strstr(a,"SZAM")==NULL && megoldas==0)
            megoldas=i;
    }
    cout<<megoldas;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Wrong answer0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/31ms320 KiB
4Wrong answer0/31ms320 KiB
5Accepted3/31ms320 KiB
6Wrong answer0/31ms320 KiB
7Wrong answer0/31ms320 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/32ms320 KiB
10Wrong answer0/32ms508 KiB
11Wrong answer0/32ms320 KiB
12Wrong answer0/32ms332 KiB