답안 #34595

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
34595 2017-11-14T05:50:43 Z 5ak0 마라톤 경주 (COCI14_utrka) C++14
80 / 80
313 ms 9968 KB
/*
ID: 5ak0
PROG:
LANG: C++11
*/

#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define mpr make_pair

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1e9 + 7;

int n;
string s, x;
map <string, int> mp;

int main(){
    #ifndef SAKO
    //freopen(".in", "r", stdin);
    //freopen(".out", "w", stdout);
    #endif // SAKO
    ios_base::sync_with_stdio(0);

    cin >> n;
    for (int i = 1; i <= n; ++i){
        cin >> s;
        ++mp[s];
    }
    for (int i = 1; i < n; ++i){
        cin >> x;
        --mp[x];
    }
    for (auto to : mp)
        if (mp[to.first])
            cout << to.first;

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2180 KB Output is correct
2 Correct 0 ms 2180 KB Output is correct
3 Correct 0 ms 2180 KB Output is correct
4 Correct 0 ms 2180 KB Output is correct
5 Correct 0 ms 2180 KB Output is correct
6 Correct 106 ms 6140 KB Output is correct
7 Correct 209 ms 7988 KB Output is correct
8 Correct 249 ms 9308 KB Output is correct
9 Correct 313 ms 9968 KB Output is correct
10 Correct 303 ms 9968 KB Output is correct