Submission #624816

#TimeUsernameProblemLanguageResultExecution timeMemory
624816rm1729Utrka (COCI14_utrka)C++14
80 / 80
132 ms8892 KiB
#include <bits/stdc++.h> using namespace std; #define int long long void solve(){ int n; cin >>n; vector <string> names(n); for(int i=0; i<n; i++){ string s; cin >>s; names[i]=s; } sort(names.begin(),names.end()); vector <string> ans(n-1); for(int i=0; i<n-1; i++){ string s; cin >>s; ans[i]=s; } sort(ans.begin(),ans.end()); bool flag = false; for(int i=0; i<n-1; i++){ if(names[i]!=ans[i]){ cout <<names[i]<<endl; flag = true; break; } } if(!flag) cout <<names[n-1]; } signed main(){ int t=1;// cin >>t; while(t--){ solve(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...