# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
872905 | vjudge1 | Best Place (NOI17_bestplace) | C++11 | 54 ms | 412 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 <iostream>
#include <algorithm>
using namespace std;
int main(){
int N = 0;
cin >> N;
int X_max,Y_max = 0;
int X_min,Y_min = 0;
for(int i = 0; i < N; i++){
int first = 0;
int second = 0;
cin >> first;
cin >> second;
if(i == 0){
X_max, X_min = first;
Y_max, Y_min = second;
}else{
X_min = min(X_min, first);
Y_min = min(Y_min, second);
X_max = max(X_max, first);
Y_max = max(Y_max, second);
}
}
int x = X_max + X_min;
int y = Y_max + Y_min;
cout << x/2 << " " << y/2;
}
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... |