# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
624816 | rm1729 | Utrka (COCI14_utrka) | C++14 | 132 ms | 8892 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |