結果

問題 No.149 碁石の移動
ユーザー yuyu_106
提出日時 2019-06-07 10:37:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 57,288 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-04 16:04:14
合計ジャッジ時間 1,207 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 4 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main(){
	int Aw,Ab,Bw,Bb,C,D;
	cin >> Aw >> Ab >> Bw >> Bb >> C >> D;
	if(C<=Aw){
		Bw+=C;
		Aw-=C;
	}
	else{
		Bw+=Aw;
		Aw=0;
	}
	Aw+= (D<=Bw)? D:Bw;
	cout << Aw << endl;
	return 0;
}
0