#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> vi;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n;
cin >> n;
vi posx = {};
vi posy = {};
for (int i = 0; i < n; i++) {
ll temp1, temp2;
cin >> temp1 >> temp2;
posx.push_back(temp1);
posy.push_back(temp2);
}
sort(posx.begin(), posx.end());
sort(posy.begin(), posy.end());
if (n%2==0) cout << posx[n/2] << " " << posy[n/2] << endl;
else cout << posx[(n-1)/2] << " " << posy[(n-1)/2] << endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
1 ms |
332 KB |
Output is correct |
4 |
Correct |
1 ms |
332 KB |
Output is correct |
5 |
Correct |
0 ms |
332 KB |
Output is correct |
6 |
Correct |
0 ms |
332 KB |
Output is correct |
7 |
Correct |
1 ms |
268 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
2008 KB |
Output is correct |
2 |
Correct |
22 ms |
2640 KB |
Output is correct |
3 |
Correct |
22 ms |
3256 KB |
Output is correct |
4 |
Correct |
18 ms |
3256 KB |
Output is correct |
5 |
Correct |
20 ms |
3256 KB |
Output is correct |
6 |
Correct |
29 ms |
3200 KB |
Output is correct |
7 |
Correct |
23 ms |
3144 KB |
Output is correct |
8 |
Correct |
23 ms |
3172 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
308 KB |
Output is correct |
3 |
Correct |
1 ms |
312 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
312 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
1 ms |
332 KB |
Output is correct |
4 |
Correct |
1 ms |
332 KB |
Output is correct |
5 |
Correct |
1 ms |
332 KB |
Output is correct |
6 |
Correct |
1 ms |
332 KB |
Output is correct |
7 |
Correct |
1 ms |
324 KB |
Output is correct |
8 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
35 ms |
2084 KB |
Output is correct |
2 |
Correct |
33 ms |
3964 KB |
Output is correct |
3 |
Correct |
27 ms |
3968 KB |
Output is correct |
4 |
Correct |
32 ms |
3316 KB |
Output is correct |
5 |
Correct |
34 ms |
4044 KB |
Output is correct |
6 |
Correct |
34 ms |
4056 KB |
Output is correct |
7 |
Correct |
34 ms |
4008 KB |
Output is correct |
8 |
Correct |
35 ms |
4068 KB |
Output is correct |