#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
const ll MOD=1e9+7;
using namespace std;
map <ll,bool> x;
map <ll,bool> y;
ll N;
vector <ll> vec1;
vector <ll> vec2;
int main(){
cin>>N;
for(int i=1;i<=N;i++){
ll a,b;
cin>>a>>b;
if(!x[a]){
x[a]=true;
vec1.push_back(a);
}
if(!y[b]){
y[b]=true;
vec2.push_back(b);
}
}
sort(vec1.begin(),vec1.end());
sort(vec2.begin(),vec2.end());
ll s1=vec1.size();
ll s2=vec2.size();
cout<<vec1[s1/2]<<' '<<vec2[s2/2]<<endl;
}
# |
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 |
204 KB |
Output is correct |
6 |
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 |
332 KB |
Output is correct |
3 |
Correct |
1 ms |
296 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Incorrect |
1 ms |
296 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
1304 KB |
Output is correct |
2 |
Correct |
106 ms |
8548 KB |
Output is correct |
3 |
Correct |
104 ms |
8440 KB |
Output is correct |
4 |
Correct |
53 ms |
1408 KB |
Output is correct |
5 |
Incorrect |
60 ms |
1444 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
324 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
227 ms |
16312 KB |
Output is correct |
2 |
Incorrect |
214 ms |
16300 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |