50152023-04-09 17:22:42Laci3000Bimmbamm (30)cpp17Wrong answer 24/303ms3480 KiB
#include <vector>
#include <iostream>

using namespace std;

int megoldo() {
    int bemenet;
    cin >> bemenet;
    int a = 0;
    vector<string>lista(bemenet);
    for (size_t i = 0; i < bemenet; i++)
    {
        cin >> lista[i];
    }for (size_t i = 0; i < bemenet; i++)
    {
        if ((i + 1) % 3 == 0 && (i + 1) % 5 == 0 && lista[i] == "BUMM") {

        }
        else if ((i + 1) % 3 == 0 && lista[i] == "BIMM") {

        }
        else if ((i + 1) % 5 == 0 && lista[i] == "BAMM") {

        }
        else if (((i + 1) % 3 == 1 || (i + 1) % 3 == 2) && lista[i] == "SZAM") {

        }
        else {
            a = i + 1;
            break;
        }
    }
    return a;
}

int main()
{
    cout << megoldo();
}

SubtaskSumTestVerdictTimeMemory
base24/30
1Accepted0/03ms1808 KiB
2Accepted0/03ms2032 KiB
3Accepted3/33ms2092 KiB
4Accepted3/33ms2216 KiB
5Accepted3/33ms2556 KiB
6Wrong answer0/33ms2864 KiB
7Accepted3/33ms2832 KiB
8Accepted3/33ms2936 KiB
9Accepted3/33ms2956 KiB
10Accepted3/33ms3212 KiB
11Accepted3/33ms3404 KiB
12Wrong answer0/33ms3480 KiB