#include <bits/stdc++.h>
#define ll long long
#define en "\n"
#define pb push_back
#define mp make_pair
#define pii pair<ll,ll>
#define fi first
#define se second
#define rep(i, a, b) for(ll i = a; i <= b; ++i)
#define per(i, a, b) for(ll i = a; i >= b; --i)
#define kaizokuO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define r0 return 0
#define all(v) v.begin(), v.end()
#define gcd(a,b) __gcd(a,b);
#define lcm(a,b) (a*b)/ __gcd(a, b)
#define bitt(x) __builtin_popcount(x)
#define fill1(arr, i, n) for(ll a = 0; a <= n; ++a) arr[a] = i;
#define fill2(arr, i, n, m) for(ll a = 0; a <= n; ++a) for(ll b = 0; b <= m; ++b) arr[a][b] = i;
#define flsh fflush(stdout)
#define ext exit(0)
#define inp freopen("input.txt","r",stdin)
#define outp freopen("output.txt","w",stdout)
using namespace std;
//const ll mod = 1e9 + 7;
//const ll mod = 998244353;
//const ll mod = 26101991;
//const ll mod = 1e8;
//const double pi = 3.14159;
pii dir[4] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
void solve(){
ll n; cin >> n;
ll x[n+2], y[n+2];
for(ll i = 1; i <= n; ++i){
cin >> x[i] >> y[i];
}
sort(x+1, x+n+1);
sort(y+1, y+n+1);
cout << x[(n/2)+1] << " " << y[(n/2)+1] << en;
}
int main() {
kaizokuO;
ll t = 1; //cin >> t;
while(t--){
solve();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
464 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
1880 KB |
Output is correct |
2 |
Correct |
16 ms |
1884 KB |
Output is correct |
3 |
Correct |
18 ms |
1880 KB |
Output is correct |
4 |
Correct |
12 ms |
1880 KB |
Output is correct |
5 |
Correct |
19 ms |
2016 KB |
Output is correct |
6 |
Correct |
17 ms |
1880 KB |
Output is correct |
7 |
Correct |
17 ms |
2136 KB |
Output is correct |
8 |
Correct |
16 ms |
1884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
1884 KB |
Output is correct |
2 |
Correct |
25 ms |
2012 KB |
Output is correct |
3 |
Correct |
16 ms |
1884 KB |
Output is correct |
4 |
Correct |
22 ms |
2024 KB |
Output is correct |
5 |
Correct |
23 ms |
1884 KB |
Output is correct |
6 |
Correct |
22 ms |
1884 KB |
Output is correct |
7 |
Correct |
25 ms |
1884 KB |
Output is correct |
8 |
Correct |
24 ms |
1884 KB |
Output is correct |