Submission #713546

#TimeUsernameProblemLanguageResultExecution timeMemory
713546ALTAKEXEUtrka (COCI14_utrka)C++14
0 / 80
1 ms308 KiB
#include<bits/stdc++.h> using namespace std; int main(){ // freopen("input.txt","r",stdin); int n; cin>>n; n=n+(n-1); vector<string> v; vector<int> k; while(n--){ string a; cin>>a; v.push_back(a); } sort(v.begin(),v.end()); for(int i=0;i<v.size();i++){ if(v[i]==v[i+1]) k.push_back(i),k.push_back(i+1); } for(int j=0;j<v.size();j++){ for(int i=0;i<k.size();i++){ if(k[j]!=j){ cout<<v[j]; 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:19: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]
   19 |     for(int j=0;j<v.size();j++){
      |                 ~^~~~~~~~~
utrka.cpp:20:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |         for(int i=0;i<k.size();i++){
      |                     ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...