50162023-04-09 17:44:49Laci3000Bimmbamm (30)cpp17Wrong answer 24/303ms3232 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/03ms1680 KiB
2Accepted0/03ms1876 KiB
3Accepted3/33ms2064 KiB
4Accepted3/33ms2268 KiB
5Accepted3/33ms2484 KiB
6Wrong answer0/33ms2564 KiB
7Accepted3/33ms2684 KiB
8Accepted3/33ms2832 KiB
9Accepted3/33ms3036 KiB
10Accepted3/33ms3148 KiB
11Accepted3/33ms3232 KiB
12Wrong answer0/33ms3232 KiB