제출 #423366

#제출 시각아이디문제언어결과실행 시간메모리
423366AmylopectinBest Place (NOI17_bestplace)C++14
100 / 100
54 ms3012 KiB
#include <iostream> #include <stdio.h> #include <algorithm> using namespace std; const int mxn = 4e5 + 10; int x[mxn] = {},y[mxn] = {}; int main() { int i,j,n,m; scanf("%d",&n); for(i=0; i<n; i++) { scanf("%d %d",&x[i],&y[i]); } sort(x,x+n); sort(y,y+n); printf("%d %d\n",x[n/2],y[n/2]); return 0; }

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

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