Submission #987203

#TimeUsernameProblemLanguageResultExecution timeMemory
987203CornerBoiBest Place (NOI17_bestplace)C++14
3 / 100
67 ms2996 KiB
#include<bits/stdc++.h> using namespace std; #define ll long long #define all(x) x.begin(),x.end() int main() { int n;cin>>n; vector<int> a_x(n); vector<int> a_y(n); for(size_t i = 0;i<n;i++) { cin>>a_x[i]>>a_y[i]; } sort(all(a_x)); sort(all(a_y)); ll k_x = ((ll)a_x[0]+a_x[n-1])/2; ll k_y = ((ll)a_y[0]+a_y[n-1])/2; cout<<k_x<<" "<<k_y<<endl; return 0; }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:14:23: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   14 |     for(size_t i = 0;i<n;i++)
      |                      ~^~
#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...