Submission #999907

#TimeUsernameProblemLanguageResultExecution timeMemory
999907daffuwuBest Place (NOI17_bestplace)C++14
100 / 100
29 ms3160 KiB
#include <bits/stdc++.h> using namespace std; #define fr first #define sc second mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); int n, x[100069], y[100069]; int main() { int i; scanf("%d", &n); for (i=1; i<=n; i++) { scanf("%d%d", x+i, y+i); } sort(x+1, x+n+1); sort(y+1, y+n+1); printf("%d %d\n", x[(n+1)/2], y[(n+1)/2]); }

Compilation message (stderr)

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