結果
| 問題 | No.2239 Friday |
| コンテスト | |
| ユーザー |
momoyuu
|
| 提出日時 | 2023-03-16 13:55:05 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 362µs | |
| コード長 | 439 bytes |
| 記録 | |
| コンパイル時間 | 1,968 ms |
| コンパイル使用メモリ | 330,952 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-30 03:34:31 |
| 合計ジャッジ時間 | 3,245 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
int a,b;
cin>>a>>b;
int ans = 1e9;
for(int i = 0;i<=a;i++){
for(int j = 0;j<=b;j++){
if(i>b||j>a) continue;
if(i!=j) continue;
//if(j+b-i!=a) continue;
int good = i + j;
int bad = a - i + b - j;
ans = min(ans,abs(good-bad));
}
}
cout<<ans<<endl;
}
momoyuu