답안 #866073

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
866073 2023-10-25T11:28:20 Z mamion 마라톤 경주 (COCI14_utrka) C++11
80 / 80
169 ms 42836 KB
#include<bits/stdc++.h>
using namespace std;

const int N = 1e6;
int n; 
map<string, int> m;
string s[N];

int main() {
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> s[i];
        m[s[i]]++;
    }
    for (int i = 1; i < n; i++) {
        string ss; cin >> ss;
        m[ss]--;
    }
    for (int i = 1; i <= n; i++) {
        if (m[s[i]] == 0) continue;
        cout << s[i];
        return 0;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 31576 KB Output is correct
2 Correct 6 ms 31580 KB Output is correct
3 Correct 7 ms 31580 KB Output is correct
4 Correct 8 ms 31640 KB Output is correct
5 Correct 8 ms 31836 KB Output is correct
6 Correct 69 ms 37400 KB Output is correct
7 Correct 126 ms 40100 KB Output is correct
8 Correct 134 ms 41808 KB Output is correct
9 Correct 169 ms 42832 KB Output is correct
10 Correct 135 ms 42836 KB Output is correct