#include <bits/stdc++.h>
using namespace std;
int med(vector<long int> v,int g)
{
return (v[(g) / 2]);
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
vector<long int> x(n), y(n);
for (int i = 0; i < n;i++) {
cin >> x[i] >> y[i];
}
sort(x.begin(),x.end());
sort(y.begin(), y.end());
cout<<med(x,n)<<" "<<med(y,n)<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
312 KB |
Output is correct |
5 |
Correct |
1 ms |
316 KB |
Output is correct |
6 |
Correct |
1 ms |
332 KB |
Output is correct |
7 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
3708 KB |
Output is correct |
2 |
Correct |
23 ms |
3788 KB |
Output is correct |
3 |
Correct |
26 ms |
4548 KB |
Output is correct |
4 |
Correct |
19 ms |
4548 KB |
Output is correct |
5 |
Correct |
22 ms |
4564 KB |
Output is correct |
6 |
Correct |
25 ms |
4548 KB |
Output is correct |
7 |
Correct |
25 ms |
4432 KB |
Output is correct |
8 |
Correct |
24 ms |
4668 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
316 KB |
Output is correct |
2 |
Correct |
1 ms |
312 KB |
Output is correct |
3 |
Correct |
1 ms |
292 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 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 |
1 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
328 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 |
320 KB |
Output is correct |
6 |
Correct |
1 ms |
324 KB |
Output is correct |
7 |
Correct |
1 ms |
332 KB |
Output is correct |
8 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
38 ms |
3756 KB |
Output is correct |
2 |
Correct |
41 ms |
5320 KB |
Output is correct |
3 |
Correct |
26 ms |
5320 KB |
Output is correct |
4 |
Correct |
33 ms |
4636 KB |
Output is correct |
5 |
Correct |
39 ms |
5316 KB |
Output is correct |
6 |
Correct |
35 ms |
5324 KB |
Output is correct |
7 |
Correct |
35 ms |
5348 KB |
Output is correct |
8 |
Correct |
38 ms |
5312 KB |
Output is correct |