Submission #1067373

#TimeUsernameProblemLanguageResultExecution timeMemory
1067373slivajanTiles (BOI24_tiles)C++17
4 / 100
91 ms2132 KiB
#include <bits/stdc++.h> using namespace std; typedef long long un; typedef vector<un> vuc; typedef pair<un, un> pun; #define REP(i, a, b) for (un i = (un)a; i < (un)b; i++) #define REPR(i, a, b) for (un i = ((un)b)-1; i >= (un)a; i--) #define FEAC(i, a) for (auto&& i : a) #define vec vector #define ALL(x) (x).begin(), (x).end() #define DEB(x) cerr << #x << " = " << (x) << endl; constexpr un INF = INT64_MAX; int main(){ un N, M; cin >> N >> M; un x_min, x_max, y_min, y_max; x_min = INF; y_min = INF; x_max = 0; y_max = 0; REP(i, 0, N){ un x, y; cin >> x >> y; x_min = min(x_min, x); y_min = min(y_min, y); x_max = max(x_max, x); y_max = max(y_max, y); } un y_delta = y_max - y_min; un x_delta = x_max - x_min; if (y_delta % 2 == 1){ cout << x_min << endl; return 0; } if (x_delta % 2 == 1){ cout << x_max-1 << endl; return 0; } cout << x_max << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...