結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-13 16:13:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 513 bytes |
| コンパイル時間 | 536 ms |
| コンパイル使用メモリ | 68,788 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 03:20:06 |
| 合計ジャッジ時間 | 1,206 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
int AW, AB, BW, BB, C, D;
cin >> AB >> AW >> BB >> BW >> C >> D;
for (int i = 0; i < C; i++) {
if (1 <= AW) AW--, BW++;
else AB--, BB++;
}
for (int i = 0; i < D; i++) {
if (1 <= BB) BB--, AB++;
else BW--, BW++;
}
cout << AB << endl;
return 0;
}
prog470