結果
問題 | No.149 碁石の移動 |
ユーザー |
![]() |
提出日時 | 2016-02-22 12:28:43 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 1,255 ms |
コンパイル使用メモリ | 109,304 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 02:59:07 |
合計ジャッジ時間 | 1,452 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto input = stdin.byLine.join(" ").split.to!(int[]); auto Aw = input[0], Ab = input[1], Bw = input[2], Bb = input[3], C = input[4], D = input[5]; (Aw - max(C - Ab, 0) + min(Bw + max(C - Ab, 0), D)).writeln; }