답안 #742241

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
742241 2023-05-16T00:30:03 Z thang 마라톤 경주 (COCI14_utrka) C++14
80 / 80
151 ms 18956 KB
#include<bits/stdc++.h>
using namespace std;
int n;
string a[200005];
map<string,int> d;
int main()
{
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    //freopen("giainhat.inp","r",stdin);freopen("giainhat.out","w",stdout);
    cin>>n;
    for(int i=1;i<=2*n-1;i++)
    {
        cin>>a[i];
        d[a[i]]++;
    }
    for(int i=1;i<=n;i++)
    if(d[a[i]]%2==1) {
        cout<<a[i];
        return 0;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 6484 KB Output is correct
2 Correct 4 ms 6584 KB Output is correct
3 Correct 4 ms 6612 KB Output is correct
4 Correct 4 ms 6672 KB Output is correct
5 Correct 6 ms 6612 KB Output is correct
6 Correct 93 ms 12760 KB Output is correct
7 Correct 129 ms 15788 KB Output is correct
8 Correct 138 ms 17860 KB Output is correct
9 Correct 151 ms 18924 KB Output is correct
10 Correct 138 ms 18956 KB Output is correct