結果
問題 | No.149 碁石の移動 |
ユーザー |
![]() |
提出日時 | 2015-11-02 00:06:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 481 ms |
コンパイル使用メモリ | 53,976 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 03:13:27 |
合計ジャッジ時間 | 1,203 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include<iostream> #include<stdio.h> using namespace std; int main(){ int aw, ab, bw, bb; cin>> aw>> ab; cin>> bw>> bb; int c, d; cin>> c>> d; int trb = min(ab, c); aw = aw - (c-trb); bw = bw + (c-trb); int trw = min(bw, d); aw = aw + trw; cout<< aw<< endl; return 0; }