제출 #1006021

#제출 시각아이디문제언어결과실행 시간메모리
1006021christinelynnBest Place (NOI17_bestplace)C++17
100 / 100
67 ms2208 KiB
#include<bits/stdc++.h> using namespace std; #define int long long signed main(){ int n; cin>>n; vector<int>x,y; for(int q=1;q<=n;q++){ int w,e; cin>>w>>e; x.push_back(w); y.push_back(e); } sort(x.begin(),x.end()); sort(y.begin(),y.end()); int ansx=1e18; if(n%2==1){ cout<<x[n/2]<<" "<<y[n/2]<<endl; } else{ cout<<x[n/2 -1]<<" "<<y[n/2-1]<<endl; } }

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

bestplace.cpp: In function 'int main()':
bestplace.cpp:20:9: warning: unused variable 'ansx' [-Wunused-variable]
   20 |     int ansx=1e18;
      |         ^~~~
#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...