Submission #51551

#TimeUsernameProblemLanguageResultExecution timeMemory
51551tranxuanbachUtrka (COCI14_utrka)C++17
80 / 80
402 ms17932 KiB
#include<bits/stdc++.h> #define dibs reserve #define OVER9000 1234567890 #define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++) #define tisic 47 #define soclose 1e-8 #define chocolate win // so much chocolate #define patkan 9 #define ff first #define ss second #define abs(x) ((x < 0)?-(x):x) #define uint unsigned int #define dbl long double using namespace std; // mylittledoge int main(){ cin.sync_with_stdio(0); cin.tie(0); int N; cin >> N; long long x = 0; map<string, int> M; for (int i = 0; i < N; i++){ string s; cin >> s; if (M.find(s) != M.end()) x += M[s]; else{ int a = M.size(); x += a; M[s] = a; } } for (int i = 0; i < N - 1; i++){ string s; cin >> s; x -= M[s]; } ALL_THE(M,it) if (x == it->ss) cout << it->ff << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...