# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
377390 |
2021-03-14T06:42:38 Z |
Araragi |
Vlak (COCI20_vlak) |
C++17 |
|
1000 ms |
1004 KB |
#pragma GCC optimize("-O3")
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
int main()
{
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
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 == 0)
{
who[0]++;
}
else if (pref == min((int)ni.size(), (int)e.size()))
{
if (min((int)ni.size(), (int)e.size()) % 2)
who[0]++;
else
who[1]++;
}
else
{
if (!(pref % 2))
who[0]++;
else
who[1]++;
}
}
}
if (who[0] > who[1])
cout << "Nina";
else
cout << "Emilija";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
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 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1063 ms |
1004 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
152 ms |
748 KB |
Output is correct |
2 |
Correct |
163 ms |
876 KB |
Output is correct |
3 |
Correct |
161 ms |
620 KB |
Output is correct |
4 |
Correct |
144 ms |
620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
555 ms |
1004 KB |
Output is correct |
2 |
Incorrect |
504 ms |
1004 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |