# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
697061 | 2023-02-08T05:10:34 Z | noobnessOVERLOADED | Best Place (NOI17_bestplace) | C++17 | 0 ms | 0 KB |
#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; } }