답안 #1114635

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1114635 2024-11-19T09:40:03 Z duytuandao21 마라톤 경주 (COCI14_utrka) C++17
80 / 80
134 ms 25672 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long

const int N = 2e5 + 7;


string s[N];
int n;
map<string, int> mark, cnt;
signed main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> s[i];
        cnt[s[i]]++;
    }
    for (int i = 1; i < n; i++) {
        string t; cin >> t;
        mark[t]++;
    }
    for (int i = 1; i <= n; i++) {
        if (mark[s[i]] != cnt[s[i]]) {
            cout << s[i];
            break;
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 6480 KB Output is correct
2 Correct 3 ms 6484 KB Output is correct
3 Correct 3 ms 6904 KB Output is correct
4 Correct 4 ms 6736 KB Output is correct
5 Correct 4 ms 6736 KB Output is correct
6 Correct 64 ms 16200 KB Output is correct
7 Correct 134 ms 20936 KB Output is correct
8 Correct 130 ms 23880 KB Output is correct
9 Correct 134 ms 25672 KB Output is correct
10 Correct 121 ms 25672 KB Output is correct