Submission #541614

# Submission time Handle Problem Language Result Execution time Memory
541614 2022-03-23T21:19:27 Z Olympia Utrka (COCI14_utrka) C++17
80 / 80
114 ms 10388 KB
#include <vector>
#include <algorithm>
#include <iostream>
#include <set>
#include <cmath>
#include <map>
#include <random>
#include <cassert>
#include <ctime>
#include <cstdlib>
#include <limits.h>

using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int N; cin >> N;
    map<string,int> myMap;
    for (int i = 0; i < N; i++) {
        string x; cin >> x;
        myMap[x]++;
    }
    for (int i = 0; i < N - 1; i++) {
        string x; cin >> x;
        myMap[x]--;
    }
    //cout << *(s.begin());
    for (auto& p: myMap) {
        if (p.second == 1) {
            cout << p.first;
            exit(0);
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 52 ms 5316 KB Output is correct
7 Correct 74 ms 7800 KB Output is correct
8 Correct 99 ms 9420 KB Output is correct
9 Correct 114 ms 10388 KB Output is correct
10 Correct 112 ms 10360 KB Output is correct