結果
問題 | No.208 王将 |
ユーザー |
|
提出日時 | 2016-09-16 11:55:30 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 472 bytes |
コンパイル時間 | 970 ms |
コンパイル使用メモリ | 118,120 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 04:28:03 |
合計ジャッジ時間 | 1,697 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto rd1 = readln.split.map!(to!int); auto x = rd1[0], y = rd1[1]; auto rd2 = readln.split.map!(to!int); auto x2 = rd2[0], y2 = rd2[1]; auto r = min(x, y); r += (x - r) + (y - r); if (x == y && x2 == y2 && x > x2) r += 1; writeln(r); }