Submission #1108971

#TimeUsernameProblemLanguageResultExecution timeMemory
1108971vjudge1Best Place (NOI17_bestplace)C++17
0 / 100
50 ms2888 KiB
#include <bits/stdc++.h> using namespace std; int main (){ int n; cin>>n; vector<int>v(n); vector<int>vec(n); for(int i=0;i<n;++i){ int x,y; cin>>v[x]; cin>>vec[y]; } sort(v.begin(),v.end()); sort(vec.begin(),vec.end()); cout<<v[n/2+1]<<" "<<vec[n/2+1]; }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:10:17: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
   10 |         cin>>v[x];
      |                 ^
bestplace.cpp:11:19: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |         cin>>vec[y];
      |                   ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...