結果
| 問題 |
No.2239 Friday
|
| ユーザー |
|
| 提出日時 | 2023-04-07 21:05:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 437 bytes |
| コンパイル時間 | 3,613 ms |
| コンパイル使用メモリ | 228,368 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 18:48:54 |
| 合計ジャッジ時間 | 4,380 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
void fast_io() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
}
int main(void) {
fast_io();
ll a, b;
cin >> a >> b;
ll m = min(a, b);
ll ans = 2e18;
for (int i = 0; i <= m; i++) {
ans = min(ans, abs(2 * i - (a + b - 2 * i)));
}
cout << ans << endl;
return 0;
}