Submission #383324

#TimeUsernameProblemLanguageResultExecution timeMemory
383324IwanttobreakfreeUtrka (COCI14_utrka)C++17
80 / 80
374 ms10496 KiB
#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 timeMemoryGrader output
Fetching results...