답안 #713560

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
713560 2023-03-22T13:28:49 Z ALTAKEXE 마라톤 경주 (COCI14_utrka) C++14
80 / 80
128 ms 11156 KB
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    string a[100000], b[100000];
    cin>>n;
    for(int i = 0; i < n; i++) cin>>a[i];
    for(int i = 0; i < n - 1; i++) cin>>b[i];
    sort(a, a + n);
    sort(b, b + n - 1);
    for(int i = 0; i < n - 1; i++)
        if(a[i] != b[i])
        {
            cout<<a[i]<<endl;
            return 0;
        }
    cout<<a[n-1];
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 6484 KB Output is correct
2 Correct 3 ms 6484 KB Output is correct
3 Correct 4 ms 6484 KB Output is correct
4 Correct 4 ms 6484 KB Output is correct
5 Correct 6 ms 6484 KB Output is correct
6 Correct 63 ms 7624 KB Output is correct
7 Correct 96 ms 9892 KB Output is correct
8 Correct 123 ms 10828 KB Output is correct
9 Correct 127 ms 11120 KB Output is correct
10 Correct 128 ms 11156 KB Output is correct