Submission #929100

#TimeUsernameProblemLanguageResultExecution timeMemory
929100KarootUtrka (COCI14_utrka)C++17
80 / 80
95 ms10436 KiB
#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 timeMemoryGrader output
Fetching results...