結果
| 問題 | No.2239 Friday |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-10 21:58:48 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 279 bytes |
| 記録 | |
| コンパイル時間 | 1,170 ms |
| コンパイル使用メモリ | 208,836 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-29 21:30:27 |
| 合計ジャッジ時間 | 2,038 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int A,B;
cin>>A>>B;
int ans=A+B;
for(int i=0;i<=min(A,B);i++){
if(A-i>B)continue;
int t=i+B-(A-i);
ans=min(ans,abs(A+B-t-t));
}
cout<<ans<<'\n';
}