7402022-01-03 16:55:14kismartongBimmbamm (30)cpp14Wrong answer 3/302ms1944 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	string s;
	string e[4] = {"SZAM", "BIMM", "BAMM", "BUMM"};
	cin >> n;
	int meg = 0;
	for (int i = 1; i < n; i++) {
		cin >> s;
		int ind;
		if (i % 3 == 0)
			ind = 1;
		else
			ind = 0;
		if (i % 5 == 0)
			ind += 3;
		else
			ind += 0;
		if (s != e[ind]) {
			meg = i;
			break;
		}
	}
	cout << meg << '\n';
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Wrong answer0/02ms1852 KiB
2Wrong answer0/01ms1892 KiB
3Wrong answer0/31ms1896 KiB
4Wrong answer0/31ms1900 KiB
5Accepted3/31ms1904 KiB
6Wrong answer0/31ms1908 KiB
7Wrong answer0/31ms1908 KiB
8Wrong answer0/31ms1916 KiB
9Wrong answer0/31ms1920 KiB
10Wrong answer0/31ms1924 KiB
11Wrong answer0/31ms1940 KiB
12Wrong answer0/31ms1944 KiB