結果
| 問題 |
No.2239 Friday
|
| ユーザー |
forest3
|
| 提出日時 | 2023-03-23 16:20:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 251 bytes |
| コンパイル時間 | 1,502 ms |
| コンパイル使用メモリ | 165,952 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 15:29:54 |
| 合計ジャッジ時間 | 1,937 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
int nma = min( a, b ) * 2;
int ans = a + b;
for( int i = 0; i <= nma; i++ ) {
int r = a + b - i;
ans = min( ans, abs( i - r ) );
}
cout << ans << endl;
}
forest3