結果
問題 | No.208 王将 |
ユーザー |
|
提出日時 | 2019-01-18 19:09:26 |
言語 | Nim (2.2.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 2,480 ms |
コンパイル使用メモリ | 60,808 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 10:19:06 |
合計ジャッジ時間 | 3,522 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 WA * 7 |
ソースコード
proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}proc scan(): int =while true:var k = getchar_unlocked()if k < '0' or k > '9': breakelse: result = 10 * result + k.ord - '0'.ordlet x = scan()let y = scan()let x2 = scan()let y2 = scan()if x == 0 and y == 0 : quit "0",0if x == 0 : quit $y,0if y == 0 : quit $x,0if x == y and x2 == y2 and x2 < x : quit $(x+1),0echo x.min(y) + abs(x-y)