結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
mayoko_
|
| 提出日時 | 2015-02-12 23:25:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 608 bytes |
| コンパイル時間 | 541 ms |
| コンパイル使用メモリ | 72,520 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 02:43:17 |
| 合計ジャッジ時間 | 1,084 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
int main(void) {
int aw, ab, bw, bb, c, d;
cin >> aw >> ab;
cin >> bw >> bb;
cin >> c >> d;
{
int tmp = min(c, ab);
aw -= c-tmp;
bw += c-tmp;
bb += tmp;
}
{
int tmp = min(d, bw);
aw += tmp;
}
cout << aw << endl;
return 0;
}
mayoko_