#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
void solve(){
int n;
cin>>n;
vector<int> pa(n);
vector<int> pb(n);
for(int i=0;i<n;i++)
cin >> pa[i] >> pb[i];
sort(pa.begin(),pa.end());
sort(pb.begin(),pb.end());
int middle = round((pa.size()-1)/2);
cout<< pa[middle]<< " "<<pb[middle]<< endl;
}
signed main(){
int t =1;
// cin>>t;
while(t--)solve();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
292 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 |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
296 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
296 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 |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
50 ms |
2852 KB |
Output is correct |
2 |
Correct |
60 ms |
2988 KB |
Output is correct |
3 |
Correct |
59 ms |
3012 KB |
Output is correct |
4 |
Correct |
53 ms |
2996 KB |
Output is correct |
5 |
Correct |
55 ms |
2992 KB |
Output is correct |
6 |
Correct |
61 ms |
2992 KB |
Output is correct |
7 |
Correct |
57 ms |
2856 KB |
Output is correct |
8 |
Correct |
57 ms |
2980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 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 |
0 ms |
284 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
320 KB |
Output is correct |
4 |
Correct |
1 ms |
320 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
276 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
86 ms |
3764 KB |
Output is correct |
2 |
Correct |
83 ms |
3788 KB |
Output is correct |
3 |
Correct |
74 ms |
3780 KB |
Output is correct |
4 |
Correct |
63 ms |
2992 KB |
Output is correct |
5 |
Correct |
84 ms |
3756 KB |
Output is correct |
6 |
Correct |
84 ms |
3780 KB |
Output is correct |
7 |
Correct |
85 ms |
3752 KB |
Output is correct |
8 |
Correct |
84 ms |
3792 KB |
Output is correct |