이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define int long long
#define inf LLONG_MAX
#define pb push_back
#define lc 2*pos+1
#define rc 2*pos+2
#define halleluya ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
signed main(){
halleluya
int n;cin>>n;
vector<int>x(n);vector<int>y(n);
for (int i=0;i<n;i++)cin>>x[i]>>y[i];
sort(x.begin(),x.end());
sort(y.begin(),y.end());
int midx=x.size()/2,midy=y.size()/2;
cout<<x[midx]<<" "<<y[midy];
}
//terpisah value x dan ynya
//median doang kah?
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |