#include<bits/stdc++.h>
using namespace std;
#define int64_t long long
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
void Solve(void) {
int N; cin >> N;
multiset<string> names;
for (int i = 1; i <= N; i ++) {
string s; cin >> s;
names.insert(s);
}
for (int i = 1; i < N; i ++) {
string s; cin >> s;
names.erase(names.find(s));
}
cout << (*names.begin());
}
signed main() {
ios_base::sync_with_stdio(false); cin.tie(0);
int Tests = 1; // cin >> Tests;
while (Tests --) {
Solve();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
40 ms |
5780 KB |
Output is correct |
7 |
Correct |
59 ms |
8276 KB |
Output is correct |
8 |
Correct |
80 ms |
10308 KB |
Output is correct |
9 |
Correct |
88 ms |
11088 KB |
Output is correct |
10 |
Correct |
85 ms |
11200 KB |
Output is correct |