aboutsummaryrefslogtreecommitdiff
path: root/contests/Round895/B/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contests/Round895/B/main.cpp')
-rwxr-xr-xcontests/Round895/B/main.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/contests/Round895/B/main.cpp b/contests/Round895/B/main.cpp
index 25927ff..81803b7 100755
--- a/contests/Round895/B/main.cpp
+++ b/contests/Round895/B/main.cpp
@@ -120,16 +120,11 @@ template <typename T, typename... TS> void dbg(T val, TS... vals) {
void solve() {
int n;
cin >> n;
- vector<vi> v(201);
int mn = INT_MAX;
for (int i = 0; i < n; i++) {
int s, d;
cin >> s >> d;
- if (d % 2 == 0) {
- mn = min(mn, s + (d / 2 - 1));
- } else {
- mn = min(mn, s + d / 2);
- }
+ mn = min(mn , s + (d - 1) / 2);
}
cout << mn << endl;
}