結果
| 問題 | No.149 碁石の移動 |
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2015-02-12 23:24:54 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 523µs | |
| コード長 | 469 bytes |
| 記録 | |
| コンパイル時間 | 1,724 ms |
| コンパイル使用メモリ | 94,000 KB |
| 実行使用メモリ | 9,856 KB |
| 最終ジャッジ日時 | 2026-10-10 21:23:01 |
| 合計ジャッジ時間 | 1,809 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
ソースコード
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
using namespace std;
int main(){
int Aw,Ab;
cin >> Aw >> Ab;
int Bw,Bb;
cin >> Bw >> Bb;
int C,D;
cin >> C >> D;
int x = min(Ab, C);
Bb += x;
Ab -= x;
Bw += C-x;
Aw -= C-x;
int y = min(Bw, D);
Aw += y;
Bw -= y;
Ab += D-y;
Bb -= D-y;
cout << Aw << endl;
return 0;
}
koyumeishi