結果
| 問題 | No.2239 Friday |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-10 21:38:18 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 865µs | |
| コード長 | 559 bytes |
| 記録 | |
| コンパイル時間 | 1,192 ms |
| コンパイル使用メモリ | 210,904 KB |
| 実行使用メモリ | 9,776 KB |
| 最終ジャッジ日時 | 2026-10-15 14:00:28 |
| 合計ジャッジ時間 | 3,077 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef _RUTHEN
#include <debug.hpp>
#else
#define show(...) true
#endif
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
template <class T> using V = vector<T>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int A, B;
cin >> A >> B;
if (A > B) swap(A, B);
// A <= B
int ans = 1 << 30;
for (int a = 0; a <= A; a++) {
int good = a + a, bad = A - a + B - a;
ans = min(ans, abs(good - bad));
}
cout << ans << '\n';
return 0;
}