#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef unsigned long long int ulli;
typedef long long ll;
typedef long long int lli;
typedef long double ld;
typedef string st;
#define all(x) x.begin(), x.end()
#define pb push_back
#define pf push_front
#define ppf pop_front
#define ppb pop_back
#define fastIO ios_base::sync_with_stdio(false); cin.tie(0);
#define pii pair<int, int>
#define psi pair<string, int>
#define F first
#define S second
#define p(a, b) pair<a, b>
#define vin vector<int>
#define v(a) vector<a>
#define pll p(ll, ll)
//------------------------------------------------------------------------------------------------------------------
#define trace(x) cout<<"> "<<#x<<" : "<<x<<endl
#define trace2(x,y) cout<<"> "<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<endl
#define trace3(x,y,z) cout<<"> "<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<" | "<<#z<<" : "<<z<<endl
#define trace4(w,x,y,z) cout<<"> "<<#w<<" : "<<w<<" | "<<#x<<" : "<<x<<" | "<<#y<<" : "<<y<<" | "<<#z<<" : "<<z<<endl
// CONSTANT
#define mod 1000000007 // 1e9+7
#define mods 998244353 // Prime
#define eps 0.000000001 // 1e-9
#define inf 2147483647 // INT_MAX
#define INF 9223372036854775807 // LLONG_MAX
//-------------------------------------------------------------------------------------------------------------------
template<typename T>
void print(pair<T, T> var) { // print pair
cout << var.first << ' ' << var.second << endl;
}
template<typename T>
void print(vector<T> var) { // print vector
for(auto i : var) {
cout << i << ' ';
} cout << endl;
}
template<typename T>
void print(vector<pair<T, T>> var) { //print vector pair
for(auto &i : var) {
cout << i.first << ' ' << i.second << endl;
}
}
//---------------------------------------------------------------------------------------------------------------------------
int main(){
fastIO
//int t; cin >> t;
// while(t--){
// }
ll n; cin >> n;
v(ll) x(n), y(n);
for(int i = 0; i < n; i++){
cin >> x[i] >> y[i];
}
sort(all(x));
sort(all(y));
cout << x[n/2] << " " << y[n/2];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 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 |
344 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
1884 KB |
Output is correct |
2 |
Correct |
19 ms |
1880 KB |
Output is correct |
3 |
Correct |
16 ms |
2036 KB |
Output is correct |
4 |
Correct |
12 ms |
1884 KB |
Output is correct |
5 |
Correct |
19 ms |
1880 KB |
Output is correct |
6 |
Correct |
16 ms |
1884 KB |
Output is correct |
7 |
Correct |
19 ms |
2136 KB |
Output is correct |
8 |
Correct |
19 ms |
1884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 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 |
0 ms |
348 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 |
0 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 |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
1884 KB |
Output is correct |
2 |
Correct |
24 ms |
1880 KB |
Output is correct |
3 |
Correct |
16 ms |
1884 KB |
Output is correct |
4 |
Correct |
23 ms |
2036 KB |
Output is correct |
5 |
Correct |
29 ms |
1880 KB |
Output is correct |
6 |
Correct |
24 ms |
1880 KB |
Output is correct |
7 |
Correct |
25 ms |
1880 KB |
Output is correct |
8 |
Correct |
25 ms |
1880 KB |
Output is correct |