Submission #423366

#TimeUsernameProblemLanguageResultExecution timeMemory
423366AmylopectinBest Place (NOI17_bestplace)C++14
100 / 100
54 ms3012 KiB
#include <iostream> #include <stdio.h> #include <algorithm> using namespace std; const int mxn = 4e5 + 10; int x[mxn] = {},y[mxn] = {}; int main() { int i,j,n,m; scanf("%d",&n); for(i=0; i<n; i++) { scanf("%d %d",&x[i],&y[i]); } sort(x,x+n); sort(y,y+n); printf("%d %d\n",x[n/2],y[n/2]); return 0; }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:9:11: warning: unused variable 'j' [-Wunused-variable]
    9 |     int i,j,n,m;
      |           ^
bestplace.cpp:9:15: warning: unused variable 'm' [-Wunused-variable]
    9 |     int i,j,n,m;
      |               ^
bestplace.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
bestplace.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |         scanf("%d %d",&x[i],&y[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...