Submission #321071

# Submission time Handle Problem Language Result Execution time Memory
321071 2020-11-10T20:14:05 Z techiehere08 Best Place (NOI17_bestplace) C++14
100 / 100
48 ms 3052 KB
#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

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 time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 0 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 0 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 23 ms 1132 KB Output is correct
2 Correct 30 ms 1132 KB Output is correct
3 Correct 31 ms 2284 KB Output is correct
4 Correct 25 ms 2276 KB Output is correct
5 Correct 29 ms 2284 KB Output is correct
6 Correct 31 ms 2276 KB Output is correct
7 Correct 31 ms 2156 KB Output is correct
8 Correct 32 ms 2284 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 42 ms 1132 KB Output is correct
2 Correct 43 ms 3052 KB Output is correct
3 Correct 31 ms 3040 KB Output is correct
4 Correct 48 ms 2276 KB Output is correct
5 Correct 43 ms 3052 KB Output is correct
6 Correct 41 ms 3044 KB Output is correct
7 Correct 41 ms 3044 KB Output is correct
8 Correct 41 ms 3052 KB Output is correct