結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,024 KB
testcase_01 AC 69 ms
15,272 KB
testcase_02 AC 68 ms
15,236 KB
testcase_03 AC 70 ms
15,052 KB
testcase_04 AC 69 ms
15,288 KB
testcase_05 AC 70 ms
15,268 KB
testcase_06 AC 71 ms
15,032 KB
testcase_07 AC 67 ms
15,244 KB
testcase_08 AC 68 ms
15,324 KB
testcase_09 AC 67 ms
15,040 KB
testcase_10 AC 69 ms
15,148 KB
testcase_11 AC 69 ms
15,248 KB
testcase_12 AC 72 ms
15,244 KB
testcase_13 AC 70 ms
15,200 KB
testcase_14 AC 71 ms
15,092 KB
testcase_15 WA -
testcase_16 AC 92 ms
17,696 KB
testcase_17 AC 128 ms
20,616 KB
testcase_18 AC 228 ms
29,956 KB
testcase_19 AC 273 ms
34,100 KB
testcase_20 AC 258 ms
33,176 KB
testcase_21 WA -
testcase_22 AC 275 ms
34,360 KB
testcase_23 AC 175 ms
34,164 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