結果
問題 |
No.149 碁石の移動
|
ユーザー |
![]() |
提出日時 | 2019-08-22 21:25:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 599 bytes |
コンパイル時間 | 1,416 ms |
コンパイル使用メモリ | 167,624 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 22:32:56 |
合計ジャッジ時間 | 2,043 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include "bits/stdc++.h" using namespace std; typedef long long ll; void Say(bool say, string a = "Yes", string b = "No"){cout << (say ? a : b) << endl;}; int main(){ ll Aw, Ab, Bw, Bb, C, D; cin >> Aw >> Ab >> Bw >> Bb >> C >> D; for(int i = 0; i < C; i++){ if(Ab){ Ab--; Bb++; } else{ Aw--; Bw++; } } for(int i = 0; i < D; i++){ if(Bw){ Bw--; Aw++; } else{ Bb--; Ab++; } } cout << Aw << endl; return 0; }