답안 #34589

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
34589 2017-11-14T05:19:07 Z 5ak0 마라톤 경주 (COCI14_utrka) C++14
0 / 80
0 ms 2020 KB
/*
ID: 5ak0
PROG:
LANG: C++11
*/

#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define mpr make_pair

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1e9 + 7;

int n;
string s;
map <string, bool> mp;

int main(){
    #ifndef SAKO
    freopen("utrka.in", "r", stdin);
    freopen("utrka.out", "w", stdout);
    #endif // SAKO
    ios_base::sync_with_stdio(0);

    cin >> n;
    for (int i = 1; i <= n; ++i){
        cin >> s;
        mp[s] = 1;
    }
    for (int i = 1; i < n; ++i){
        cin >> s;
        mp[s] = 0;
    }
    for (auto x : mp)
        if (mp[x.first] == 1)
            return !(cout << x.first);

    return 0;
}

Compilation message

utrka.cpp: In function 'int main()':
utrka.cpp:25:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen("utrka.in", "r", stdin);
                                    ^
utrka.cpp:26:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen("utrka.out", "w", stdout);
                                      ^
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 2020 KB Execution killed because of forbidden syscall [unknown syscall - gap in table] (292)
2 Halted 0 ms 0 KB -