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>
using namespace std;
#define int long long
#define vec vector
const int INF = 1e17;
int32_t main() {
int n, m;
cin >> n >> m;
int l = INF, r = -INF, u = -INF, d = INF;
for(int i = 0; i<n; i++) {
int x, y;
cin >> x >> y;
l = min(l, x);
r = max(r, x);
u = max(u, y);
d = min(d, y);
}
if((u-d)%2) {
cout << l << '\n';
return 0;
}
cout << (r)-((r-l)%2) << '\n';
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |