Submission #321071

#TimeUsernameProblemLanguageResultExecution timeMemory
321071techiehere08Best Place (NOI17_bestplace)C++14
100 / 100
48 ms3052 KiB
#include <bits/stdc++.h>

using namespace std;

int main(){
  int n, A[100005], B[100005];
  scanf("%d", &n);
  for(int i = 0; i < n; i++){
    scanf("%d%d", A + i, B + i);
  }
  sort(A, A + n), sort(B, B + n);
  n -= 1;
  n /= 2;
  printf("%d %d\n", A[n], B[n]);
  return 0;
}

Compilation message (stderr)

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