# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
499805 | ccno1 | Best Place (NOI17_bestplace) | C++17 | 91 ms | 2200 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include <climits>
#define ll long long int
#define all(x) (x).begin(), (x).end()
const ll inf = LLONG_MAX;
using namespace std;
ll nxt(){
ll x = 0;
cin >> x;
return x;
}
template <typename type>
istream &operator>>(istream &in, vector <type> &vec){
ll len = vec.size();
for(int i = 0; i < len; i++){
in >> vec[i];
}
return in;
}
template <typename type>
ostream &operator<<(ostream &out, vector <type> &vec){
for (auto val : vec){
out << val << " ";
}
return out;
}
ll round_n(double a){
if(a - floor(a) > 0.5){
return ceil(a);
}else{
return floor(a);
}
}
void testcase(){
ll n = nxt();
vector <int> x(n);
vector <int> y(n);
for(int i = 0;i < n ; i++){
x[i] = nxt();
y[i] = nxt();
}
sort(all(x));
sort(all(y));
cout << x[floor(n/2)] << " " << y[floor(n/2)] << endl;
}
int main(){
ios_base::sync_with_stdio;
cin.tie(0);
cout.tie(0);
testcase();
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |