#include <bits/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
int x[N];
int y[N];
for (int i = 0; i < N; i++)
{
cin >> x[i];
cin >> y[i];
}
sort(x, x + N);
sort(y, y + N);
int minx;
int miny;
if (N % 2 == 0)
{
minx = (x[N / 2 - 1] + x[(N + 1) / 2 - 1]) / 2;
miny = (y[N / 2 - 1] + y[(N + 1) / 2 - 1]) / 2;
}
else
{
minx = x[N / 2];
miny = y[N / 2];
}
cout << minx << " " << miny << "\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
292 KB |
Output is correct |
2 |
Correct |
0 ms |
292 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
296 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
296 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
51 ms |
2116 KB |
Output is correct |
2 |
Correct |
61 ms |
2208 KB |
Output is correct |
3 |
Correct |
59 ms |
2216 KB |
Output is correct |
4 |
Correct |
52 ms |
2212 KB |
Output is correct |
5 |
Correct |
56 ms |
2180 KB |
Output is correct |
6 |
Correct |
64 ms |
2116 KB |
Output is correct |
7 |
Correct |
59 ms |
2176 KB |
Output is correct |
8 |
Correct |
63 ms |
2216 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
296 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
300 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
2 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
304 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
107 ms |
2852 KB |
Output is correct |
2 |
Correct |
89 ms |
2952 KB |
Output is correct |
3 |
Correct |
82 ms |
2960 KB |
Output is correct |
4 |
Correct |
76 ms |
2196 KB |
Output is correct |
5 |
Correct |
86 ms |
2944 KB |
Output is correct |
6 |
Correct |
85 ms |
2884 KB |
Output is correct |
7 |
Correct |
86 ms |
2980 KB |
Output is correct |
8 |
Correct |
85 ms |
2952 KB |
Output is correct |