Submission #882820

# Submission time Handle Problem Language Result Execution time Memory
882820 2023-12-03T19:11:59 Z unexpectedbro Utrka (COCI14_utrka) C++14
80 / 80
207 ms 18208 KB
#include<bits/stdc++.h>
using namespace std;
int main() {
	int n; cin >> n;
	map<string, int>cnt, finished;
	for (int i = 0; i < n; i++) {
		string s; cin >> s;
		cnt[s]++;
	}
	for (int i = 1; i < n; i++) {
		string s; cin >> s;
		finished[s]++;
	}
	string ans;
	for (auto i : cnt) {
		int x = i.second;
		int y = finished[i.first];
		if (x != y) {
			ans = i.first;
		}
	}
	cout << ans << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 444 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 2 ms 604 KB Output is correct
6 Correct 89 ms 9236 KB Output is correct
7 Correct 131 ms 13552 KB Output is correct
8 Correct 148 ms 16724 KB Output is correct
9 Correct 207 ms 18148 KB Output is correct
10 Correct 186 ms 18208 KB Output is correct