Submission #1187050

#TimeUsernameProblemLanguageResultExecution timeMemory
1187050altern23Best Place (NOI17_bestplace)C++20
100 / 100
25 ms6472 KiB
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define pii pair<ll, ll>
#define fi first
#define sec second
#define ld long double

const int MAXN = 2e5;
const ll INF = 4e18;
const int MOD = 1e9 + 7;

vector<ll> adj[MAXN + 5];
	
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int tc = 1;	
	// cin >> tc;		
	for(;tc--;){
		ll N; cin >> N;
		vector<ll> x(N + 5), y(N + 5);
		for(int i = 1; i <= N; i++){
			cin >> x[i] >> y[i];
		}
		sort(x.begin() + 1, x.begin() + 1 + N);
		sort(y.begin() + 1, y.begin() + 1 + N);
		cout << x[(N + 1) / 2] << " " << y[(N + 1) / 2] << "\n";
	}
}

/*

*/
#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...