2019-07-18から1日間の記事一覧
問題:A - 赤赤赤赤青 #include <algorithm> #include <iostream> using namespace std; int main(void) { int n, x; cin.tie(0); ios::sync_with_stdio(false); cin >> n >> x; cout << min(n - x, x - 1) << "\n"; return 0; }</iostream></algorithm>
問題:A - 赤赤赤赤青 #include <algorithm> #include <iostream> using namespace std; int main(void) { int n, x; cin.tie(0); ios::sync_with_stdio(false); cin >> n >> x; cout << min(n - x, x - 1) << "\n"; return 0; }</iostream></algorithm>