# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
621055 | mannshah1211 | Utrka (COCI14_utrka) | C++14 | 213 ms | 26980 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;
int main(){
int n;
cin >> n;
string a[n];
unordered_map <string, int> freq2;
for(int i = 0; i < n; i++){
cin >> a[i];
freq2[a[i]] = 0;
}
for(int i = 0; i < n; i++){
freq2[a[i]]++;
}
unordered_map <string, int> freq;
string b[n - 1];
for(int i = 0; i < n - 1; i++){
cin >> b[i];
freq[b[i]] = 0;
}
for(int i = 0; i < n - 1; i++){
freq[b[i]]++;
}
for(int i = 0; i < n; i++){
if(freq2[a[i]] != freq[a[i]]){
cout << a[i];
break;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |