結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-17 17:05:55 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 415 bytes |
| コンパイル時間 | 1,091 ms |
| コンパイル使用メモリ | 90,536 KB |
| 最終ジャッジ日時 | 2025-01-18 01:42:33 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <optional>
#include <vector>
using namespace std;
int main() {
int32_t aw, ab, bw, bb, c, d;
cin >> aw >> ab >> bw >> bb >> c >> d;
auto b = min(ab, c), w = c - b;
aw -= w;
ab -= b;
bw += w;
bb += b;
w = min(bw, d);
cout << aw + w << endl;
return 0;
}