제출 #425449

#제출 시각아이디문제언어결과실행 시간메모리
425449errorgornBest Place (NOI17_bestplace)C++17
100 / 100
57 ms3252 KiB
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int n; vector<int> vx,vy; int main(){ scanf("%d",&n); int a,b; for (int x=0;x<n;x++){ scanf("%d%d",&a,&b); vx.push_back(a); vy.push_back(b); } sort(vx.begin(),vx.end()); sort(vy.begin(),vy.end()); printf("%d %d\n",vx[n>>1],vy[n>>1]); }

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

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