結果
問題 |
No.208 王将
|
ユーザー |
![]() |
提出日時 | 2017-08-12 05:49:01 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 508 bytes |
コンパイル時間 | 637 ms |
コンパイル使用メモリ | 103,216 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 21:30:50 |
合計ジャッジ時間 | 1,582 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import std.algorithm; import std.array; import std.conv; import std.math; import std.stdio; import std.string; import std.range; int readint() { return readln.chomp.to!int; } int[] readints() { return readln.split.map!(to!int).array; } int calc(int x, int y, int gx, int gy) { int ans = max(x, y); if (x == y && gx == gy && gx < x) { ans++; } return ans; } void main() { auto xs = readints(); auto ys = readints(); writeln(calc(xs[0], xs[1], ys[0], ys[1])); }