結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-31 00:41:40 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 524 bytes |
| コンパイル時間 | 626 ms |
| コンパイル使用メモリ | 114,268 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 03:56:52 |
| 合計ジャッジ時間 | 1,274 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
import std.algorithm, std.array, std.container, std.range;
import std.numeric, std.math, std.bigint, std.bitmanip, std.random;
import std.string, std.conv, std.stdio, std.typecons;
void main()
{
auto rd1 = readln.split.map!(to!int);
auto aw = rd1[0], ab = rd1[1];
auto rd2 = readln.split.map!(to!int);
auto bw = rd2[0], bb = rd2[1];
auto rd3 = readln.split.map!(to!int);
auto c = rd3[0], d = rd3[1];
auto b1 = min(ab, c);
aw -= c - b1;
bw += c - b1;
auto w2 = min(bw, d);
aw += w2;
writeln(aw);
}