Submission #713556

#TimeUsernameProblemLanguageResultExecution timeMemory
713556ALTAKEXEUtrka (COCI14_utrka)C++14
0 / 80
1097 ms5816 KiB
#include<bits/stdc++.h> using namespace std; int main(){ //freopen("input.txt","r",stdin); long long int n; cin>>n; n=n+(n-1); vector<string> v; vector<int> k; while(n--){ string a; cin>>a; v.push_back(a); } long long int t=1; for(int i=0;i<v.size();i++){ t=1; while(t<v.size()){ if(v[i]==v[i+t]){ v[i]='0'; v[i+t]='0'; } t++; } } for(int i=0;i<v.size();i++){ if(v[i]!="0"){ cout<<v[i]; return 0; } } return 0; }

Compilation message (stderr)

utrka.cpp: In function 'int main()':
utrka.cpp:16:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     for(int i=0;i<v.size();i++){
      |                 ~^~~~~~~~~
utrka.cpp:18:16: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |         while(t<v.size()){
      |               ~^~~~~~~~~
utrka.cpp:26:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |     for(int i=0;i<v.size();i++){
      |                 ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...