#include <bits/stdc++.h>
#define pb push_back
using namespace std;
int main()
{
int n;
cin >> n;
vector<string> nin(n);
for (auto& it : nin)
cin >> it;
int m;
cin >> m;
vector<string> em(m);
for (auto& it : em)
cin >> it;
map<int, int> who;
for (auto ni : nin)
{
for (auto e : em)
{
int pref = 0;
for (int i = 0; i < min((int)ni.size(), (int)e.size()); i++)
if (ni[i] == e[i])
pref++;
else break;
if (!(pref % 2))
who[0]++;
else
who[1]++;
}
}
if (who[0] > who[1])
cout << "Nina";
else
cout << "Emilija";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1089 ms |
1260 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
169 ms |
1004 KB |
Output is correct |
2 |
Correct |
174 ms |
1004 KB |
Output is correct |
3 |
Correct |
164 ms |
876 KB |
Output is correct |
4 |
Correct |
162 ms |
876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
585 ms |
1260 KB |
Output is correct |
2 |
Incorrect |
548 ms |
1132 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |