結果

問題 No.602 隠されていたゲーム2
ユーザー syarosyaro
提出日時 2017-12-02 00:34:12
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 34,296 KB
最終ジャッジ日時 2023-08-18 18:35:59
合計ジャッジ時間 4,607 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
15,072 KB
testcase_01 AC 70 ms
15,160 KB
testcase_02 AC 69 ms
15,096 KB
testcase_03 AC 68 ms
15,264 KB
testcase_04 AC 73 ms
15,260 KB
testcase_05 AC 69 ms
15,152 KB
testcase_06 AC 71 ms
15,200 KB
testcase_07 AC 68 ms
15,012 KB
testcase_08 AC 68 ms
15,148 KB
testcase_09 AC 70 ms
15,148 KB
testcase_10 AC 70 ms
15,272 KB
testcase_11 AC 69 ms
15,240 KB
testcase_12 AC 69 ms
15,240 KB
testcase_13 AC 67 ms
15,156 KB
testcase_14 AC 68 ms
15,008 KB
testcase_15 WA -
testcase_16 AC 92 ms
17,504 KB
testcase_17 AC 123 ms
20,892 KB
testcase_18 AC 216 ms
29,708 KB
testcase_19 AC 264 ms
34,120 KB
testcase_20 AC 260 ms
33,288 KB
testcase_21 WA -
testcase_22 AC 259 ms
34,296 KB
testcase_23 AC 169 ms
34,028 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%2<1?q>D.max*2:(o.max||9e9)+(e.max||9e9)<q||f.min>q)?-1:2
0