Submission #145977

# Submission time Handle Problem Language Result Execution time Memory
145977 2019-08-21T13:31:28 Z grobar Utrka (COCI14_utrka) C++14
80 / 80
411 ms 19092 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
   map<string,int>m;
   int n;
   cin>>n;
   string a[2*n-1];
   for(int i=0;i<(2*n-1);i++)
   {
       cin>>a[i];
       m[a[i]]++;
   }
   for(int i=0;i<(2*n-1);i++)
   {
       if(m[a[i]]%2==1)
       {
           cout<<a[i]<<endl;
           return 0;
       }
   }
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 4 ms 376 KB Output is correct
4 Correct 5 ms 504 KB Output is correct
5 Correct 5 ms 504 KB Output is correct
6 Correct 188 ms 9860 KB Output is correct
7 Correct 330 ms 14220 KB Output is correct
8 Correct 378 ms 17380 KB Output is correct
9 Correct 411 ms 19020 KB Output is correct
10 Correct 399 ms 19092 KB Output is correct