Submission #568667

# Submission time Handle Problem Language Result Execution time Memory
568667 2022-05-26T03:15:55 Z Garguy22 Utrka (COCI14_utrka) C++17
0 / 80
76 ms 20936 KB
#include <iostream>
#include <string>
#include <map>
using namespace std;

string str[100007];
map<string, int> mp;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int n;
	cin >> n;
	for(int i = 0; i < 2*n-1; i++){
		cin >> str[i];
		mp[str[i]]++;
	}
	for(int i = 0; i < 2*n; i++){
		if(mp[str[i]] % 2){
			cout << str[i] << endl;
			return 0;
		}
	}

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 3412 KB Output is correct
2 Correct 2 ms 3412 KB Output is correct
3 Correct 2 ms 3412 KB Output is correct
4 Correct 3 ms 3540 KB Output is correct
5 Correct 3 ms 3540 KB Output is correct
6 Correct 76 ms 8564 KB Output is correct
7 Runtime error 74 ms 20936 KB Execution killed with signal 11
8 Halted 0 ms 0 KB -