ARC 123
Table of Contents
https://atcoder.jp/contests/arc123
A. Arithmetic Sequence
https://atcoder.jp/contests/arc123/tasks/arc123_a
解説 AC
void solve() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
ll a, b, c;
cin >> a >> b >> c;
ll x = b * 2 - a - c;
ll ans = 0;
if (x >= 0) {
ans = x;
} else {
x = abs(x);
ll q = (x + 1) / 2;
ll r = x % 2;
ans = q + r;
}
cout << ans << endl;
}
B. Increasing Triples
https://atcoder.jp/contests/arc123/tasks/arc123_b
C. 1, 2, 3 - Decomposition
https://atcoder.jp/contests/arc123/tasks/arc123_c
D. Inc, Dec - Decomposition
https://atcoder.jp/contests/arc123/tasks/arc123_d
E. Training
https://atcoder.jp/contests/arc123/tasks/arc123_e