Submission #1143857

#TimeUsernameProblemLanguageResultExecution timeMemory
1143857THXuanUtrka (COCI14_utrka)C++20
80 / 80
90 ms8264 KiB
#include <iostream> #include <vector> #include <algorithm> #include <bitset> #include <cmath> #include <queue> #include <set> #include <map> #define INF 1e9 using namespace std; typedef long long ll; void solve() { int n; cin >> n; map<string, int>v; for (int i = 1; i <= n; i++) { string s; cin >> s; v[s]++; } for (int i = 1; i <= n - 1; i++) { string s; cin >> s; v[s]--; } for (auto u : v) { if (u.second != 0) { for (int i = 0; i < u.second; i++)cout << u.first << "\n"; } } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; //cin>>t; while (t--) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...