結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
suibaka_ku
|
| 提出日時 | 2017-03-08 10:29:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 595 ms |
| コンパイル使用メモリ | 78,288 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-24 03:22:57 |
| 合計ジャッジ時間 | 1,195 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
using ll = long long;
constexpr ll M = 1e9+7;
int main() {
int aw, ab, bw, bb;
cin >> aw >> ab >> bw >> bb;
int c,d;
cin >> c >> d;
int r = min(aw, aw+(ab-c));
cout << r + min(bw+aw-r, d) << endl;
}
suibaka_ku