# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
300075 | 2020-09-16T12:40:05 Z | theshadow_04 | 마라톤 경주 (COCI14_utrka) | C++14 | 240 ms | 14712 KB |
// VU TRUONG AN #include <bits/stdc++.h> #define F first #define S second #define MOD 1000000007 #define pb push_back #define bit(x,p) ((x>>p) & 1) #define ll long long #define Task "UTRKA" using namespace std; const int base = 100003; const int maxn = 100005; string s[maxn]; int n; map<string,int> M; int main(){ ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); if(fopen(Task".inp","r")){ freopen(Task".inp","r",stdin); freopen(Task".out","w",stdout); } cin >> n; for(int i = 1;i <= n;++i) cin >> s[i]; for(int i = 1;i < n;++i){ string a; cin >> a; M[a] ++; } for(int i = 1;i <= n;++i){ if(!M[s[i]]){ cout << s[i]; return 0; } M[s[i]]--; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 3456 KB | Output is correct |
2 | Correct | 3 ms | 3456 KB | Output is correct |
3 | Correct | 3 ms | 3456 KB | Output is correct |
4 | Correct | 4 ms | 3528 KB | Output is correct |
5 | Correct | 3 ms | 3584 KB | Output is correct |
6 | Correct | 71 ms | 9184 KB | Output is correct |
7 | Correct | 138 ms | 11896 KB | Output is correct |
8 | Correct | 171 ms | 13768 KB | Output is correct |
9 | Correct | 139 ms | 14712 KB | Output is correct |
10 | Correct | 240 ms | 14712 KB | Output is correct |