제출 #1092905

#제출 시각아이디문제언어결과실행 시간메모리
1092905SunbaeBest Place (NOI17_bestplace)C++17
100 / 100
31 ms3168 KiB
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int a[2][N]; signed main(){ int n; scanf("%d", &n); for(int i = 0; i<n; ++i) scanf("%d %d", &a[0][i], &a[1][i]); for(int j = 0; j<2; ++j){ sort(a[j], a[j]+n); printf("%d ", a[j][n/2 - (!(n&1))]); } }

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

bestplace.cpp: In function 'int main()':
bestplace.cpp:6:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |  int n; scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
bestplace.cpp:7:32: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |  for(int i = 0; i<n; ++i) scanf("%d %d", &a[0][i], &a[1][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...