답안 #209573

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
209573 2020-03-14T17:08:06 Z DodgeBallMan 마라톤 경주 (COCI14_utrka) C++14
80 / 80
352 ms 18296 KB
#include <bits/stdc++.h>

using namespace std;

map<string,int> mp, mp2;
int n;

int main()
{
    scanf("%d",&n);
    for( int i = 1 ; i <= n ; i++ ) {
        string s;
        cin >> s;
        mp[s]++;
    }
    for( int i = 1 ; i < n ; i++ ) {
        string s;
        cin >> s;
        mp2[s]++;
    }
    for( auto m : mp ) {
        if( mp2[m.first] != m.second ) {
            cout << m.first;
            return 0;
        }
    }
}

Compilation message

utrka.cpp: In function 'int main()':
utrka.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 6 ms 248 KB Output is correct
4 Correct 8 ms 504 KB Output is correct
5 Correct 7 ms 504 KB Output is correct
6 Correct 147 ms 9340 KB Output is correct
7 Correct 263 ms 13688 KB Output is correct
8 Correct 332 ms 16632 KB Output is correct
9 Correct 352 ms 18296 KB Output is correct
10 Correct 330 ms 18296 KB Output is correct