20242022-12-15 10:10:47szabel26Bimmbamm (30)cpp17Wrong answer 0/303ms3488 KiB
#include <iostream>
//#include <fstream>
#include <string>
#include <vector>
using namespace std;

string s;

int i,n;

vector<string>x;

int main()
{
    cin>>n;
    x.resize(n+1);
    for(i=1;i<=n;++i)
    {
        cin>>s;
        x.push_back(s);
    }
    for(i=0;i<n;++i)
    {
        if((i+1)%3==0 && (i+1)%5!=0 && x[i]!="BIMM") break;
        if((i+1)%5==0 && (i+1)%3!=0 && x[i]!="BAMM") break;
        if((i+1)%3==0 && (i+1)%3==0 && x[i]!="BUMM") break;
    }
    cout<<i+1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Wrong answer0/03ms1880 KiB
2Wrong answer0/02ms2228 KiB
3Wrong answer0/32ms2176 KiB
4Wrong answer0/32ms2384 KiB
5Wrong answer0/32ms2600 KiB
6Wrong answer0/32ms2832 KiB
7Wrong answer0/32ms3164 KiB
8Wrong answer0/32ms3044 KiB
9Wrong answer0/32ms3120 KiB
10Wrong answer0/32ms3428 KiB
11Wrong answer0/32ms3440 KiB
12Wrong answer0/32ms3488 KiB