답안 #969631

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
969631 2024-04-25T11:36:33 Z RandomUser 마라톤 경주 (COCI14_utrka) C++17
80 / 80
141 ms 8348 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;

    map<string, int> mp;
    string s;
    for(int i=0; i<2*n-1; i++) {
        cin >> s;
        if(i < n) mp[s]++;
        else mp[s]--;
    }
    
    for(auto &[S, C] : mp) {
        if(C > 0) {
            cout << S << '\n';
            return 0;
        }
    }

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 512 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 55 ms 4188 KB Output is correct
7 Correct 84 ms 6228 KB Output is correct
8 Correct 121 ms 7548 KB Output is correct
9 Correct 141 ms 8348 KB Output is correct
10 Correct 118 ms 8020 KB Output is correct