# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
697061 | noobnessOVERLOADED | Best Place (NOI17_bestplace) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int a[n][2];
int b[n];
int c[n];
for(int i = 0; i <= n-1; i++){
cin >> a[i][0] >> a[i][1];
}
for(int j = 0; j <= n-1; i++){
a[j][0] = b[j];
}
for(int k = 0; k <= n-1; i++){
a[k][1] = c[k];
}
int m = n/2;
int z = 2*m;
int o = n-z;
sort(b, b+n);
sort(c, c+n);
if(o=1){
int sum1 = b[m+1];
int sum2 = c[m+1];
cout << sum1 << " " << sum2;
}
else{
int sum1 = (b[m]+b[m+1])/2;
int sum2 = (c[m]+c[m+1])/2;
cout << sum1 << " " << sum2;
}
}