Submission #929100

# Submission time Handle Problem Language Result Execution time Memory
929100 2024-02-17T17:19:29 Z Karoot Utrka (COCI14_utrka) C++17
80 / 80
95 ms 10436 KB
#include <iostream>
#include <cmath>
#include <unordered_map>
#include <map>
#include <set>
#include <queue>
#include <vector>
#include <string>
#include <iomanip>
#include <algorithm>

#define all(x)  (x).begin(), (x).end()
#define rall(x)  (x).rbegin(), (x).rend()

using namespace std;

typedef long long ll;

ll linf = 1e15+1;

inline void scoobydoobydoo(){
    ios::sync_with_stdio(false);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
}

map<string, ll> M;

int main(){
    scoobydoobydoo();
    int n; cin >> n;
    for (int i = 0; i < n; i++){
        string s; cin >> s;
        M[s]++;
    }

    for (int i = 0; i < n-1; i++){
        string s; cin >> s;
        M[s]--;
    }

    for (auto& e : M){
        if (e.second == 1)cout << e.first << endl;
    }


    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 464 KB Output is correct
4 Correct 1 ms 560 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 40 ms 5468 KB Output is correct
7 Correct 77 ms 7708 KB Output is correct
8 Correct 93 ms 9864 KB Output is correct
9 Correct 95 ms 10324 KB Output is correct
10 Correct 93 ms 10436 KB Output is correct