Submission #383324

# Submission time Handle Problem Language Result Execution time Memory
383324 2021-03-29T15:38:42 Z Iwanttobreakfree Utrka (COCI14_utrka) C++17
80 / 80
374 ms 10496 KB
#include <iostream>
#include <map>
using namespace std;
int main(){
	int n;
	string str;
	cin>>n;
	map<string,int> m;
	for(int i=0;i<n;i++){
	    cin>>str;
		if(m.find(str)==m.end()){
			m.insert(make_pair(str,1));
		}
		else m[str]++;
	}
	for(int i=0;i<n-1;i++){
		cin>>str;
		m[str]--;
		if(m[str]==0)m.erase(str);
	}
	for(auto it=m.begin();it!=m.end();it++){
		cout<<it->first;
		break;
	}
}
# 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 2 ms 364 KB Output is correct
4 Correct 3 ms 364 KB Output is correct
5 Correct 3 ms 364 KB Output is correct
6 Correct 165 ms 5484 KB Output is correct
7 Correct 261 ms 7788 KB Output is correct
8 Correct 335 ms 9564 KB Output is correct
9 Correct 362 ms 10348 KB Output is correct
10 Correct 374 ms 10496 KB Output is correct