#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
//#define size size()
const int mod = 1000 * 1000 * 1000 + 7;
const int N = 100005;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin>>n;
int a[n] , b[n];
for (int i = 0; i < n; ++i) {
cin>>a[i]>>b[i];
}
vector<pair<int, int > > v;
for (int i = 0; i < n; ++i) {
v.push_back({a[i],b[i]});
}
sort(v.begin(), v.end());
cout<<v[n/2].first<<" "<<v[n/2].second<<endl;
//cout<<v[n/2].second;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
316 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
4052 KB |
Output is correct |
2 |
Correct |
26 ms |
4788 KB |
Output is correct |
3 |
Correct |
34 ms |
5188 KB |
Output is correct |
4 |
Correct |
24 ms |
5188 KB |
Output is correct |
5 |
Correct |
22 ms |
5200 KB |
Output is correct |
6 |
Correct |
25 ms |
5184 KB |
Output is correct |
7 |
Correct |
28 ms |
5056 KB |
Output is correct |
8 |
Correct |
25 ms |
5200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
32 ms |
4048 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |