結果

問題 No.602 隠されていたゲーム2
ユーザー syarosyaro
提出日時 2017-12-02 00:25:34
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 29,952 KB
最終ジャッジ日時 2024-05-06 00:15:28
合計ジャッジ時間 4,976 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
12,160 KB
testcase_01 AC 73 ms
11,904 KB
testcase_02 AC 76 ms
12,032 KB
testcase_03 AC 75 ms
12,032 KB
testcase_04 AC 74 ms
12,288 KB
testcase_05 AC 72 ms
11,904 KB
testcase_06 AC 75 ms
12,032 KB
testcase_07 AC 75 ms
12,032 KB
testcase_08 AC 74 ms
12,032 KB
testcase_09 AC 74 ms
12,032 KB
testcase_10 AC 76 ms
12,160 KB
testcase_11 AC 76 ms
11,904 KB
testcase_12 AC 76 ms
12,032 KB
testcase_13 AC 73 ms
12,288 KB
testcase_14 AC 75 ms
12,160 KB
testcase_15 WA -
testcase_16 AC 100 ms
14,944 KB
testcase_17 AC 140 ms
17,792 KB
testcase_18 AC 245 ms
26,496 KB
testcase_19 AC 289 ms
29,788 KB
testcase_20 AC 273 ms
28,660 KB
testcase_21 WA -
testcase_22 AC 284 ms
29,812 KB
testcase_23 AC 229 ms
29,952 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,*D,X,Y="+gets(p).split*?,
q=X.abs+Y.abs
o,e=D.partition(&:odd?).map &:sort
f=o.map{|o|(e.bsearch{|e|e>o}||9e9)-o}+e.map{|e|(o.bsearch{|o|o>e}||9e9)-e}
p q<1?0:D.member?(q)?1:q>D.max*2||(q%2>0&&f.min>q)?-1:2
0