제출 #243953

#제출 시각아이디문제언어결과실행 시간메모리
243953arnold518Best Place (NOI17_bestplace)C++14
100 / 100
56 ms1152 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int MAXN = 1e5; int N; int A[MAXN+10], B[MAXN+10]; int main() { int i, j; scanf("%d", &N); for(i=1; i<=N; i++) scanf("%d%d", &A[i], &B[i]); sort(A+1, A+N+1); sort(B+1, B+N+1); printf("%d %d\n", A[(N+1)/2], B[(N+1)/2]); }

컴파일 시 표준 에러 (stderr) 메시지

bestplace.cpp: In function 'int main()':
bestplace.cpp:15:9: warning: unused variable 'j' [-Wunused-variable]
  int i, j;
         ^
bestplace.cpp:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &N);
  ~~~~~^~~~~~~~~~
bestplace.cpp:18:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(i=1; i<=N; i++) 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...