Submission #201455

# Submission time Handle Problem Language Result Execution time Memory
201455 2020-02-10T15:46:20 Z EmmanuelAC Utrka (COCI14_utrka) C++14
80 / 80
586 ms 18296 KB
#include<bits/stdc++.h>
using namespace std;

int main(){
  int n; cin >> n;

  map<string, int> ms;
  set<string> sol;
  for(int i=0; i<n; i++){
    string s; cin >> s; 
    
    ms[s] ++;
    sol.insert(s);
  }
  
  for(int i=0; i<n-1; i++){
    string s; cin >> s;
    
    ms[s]--;
    if(ms[s] == 0) sol.erase(s);
  }

  cout << *(sol.begin()) << "\n";
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 7 ms 376 KB Output is correct
4 Correct 8 ms 504 KB Output is correct
5 Correct 8 ms 504 KB Output is correct
6 Correct 270 ms 9336 KB Output is correct
7 Correct 428 ms 13688 KB Output is correct
8 Correct 506 ms 16760 KB Output is correct
9 Correct 586 ms 18296 KB Output is correct
10 Correct 566 ms 18296 KB Output is correct