# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1104415 | qrn | Utrka (COCI14_utrka) | C++14 | 1086 ms | 9440 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;
template<class ISqr, class T>
ISqr& operator>>(ISqr& is, vector<T>& v) { for (auto& x : v) is >> x; return is; }
#define SPEED \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); \
cout.tie(NULL);
template <typename T>
void show(vector<T> &v) {
for (T i : v) {
cout << i << ' ';
}
cout << endl;
}
#define pb push_back
#define ins insert
#define fi first
#define se second
#define endl "\n"
#define ALL(x) x.begin(), x.end()
#define sz(x) x.size()
#define int long long
#define _ << " " <<
#define no cout << "No" << endl;
#define yes cout << "Yes" << endl;
#define impos cout << -1 << endl;
#define vi vector<int>
#define pii pair<int,int>
#define vpii vector<pii>
void solve() {
map<string,int>cnt, cntt;
int n;
cin >> n;
for(int i = 1; i <= n; i++) {
string s;
cin >> s;
cnt[s]++;
cntt[s] = 0;
}
for(int i = 1; i <= n-1; i++) {
string s;
cin >> s;
cntt[s]++;
}
for(auto it : cnt) {
for(auto itt : cntt) {
if(it.fi == itt.fi) {
if(it.se != itt.se) {
cout << it.fi << endl;
return;
}
}
}
}
}
signed main(){
SPEED;
int t = 1;
// cin >> t;
for(int cs = 1; cs <= t; cs++) {
solve();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |