結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,244 KB
testcase_01 AC 78 ms
15,180 KB
testcase_02 AC 71 ms
15,300 KB
testcase_03 AC 70 ms
15,040 KB
testcase_04 AC 71 ms
15,256 KB
testcase_05 AC 70 ms
15,264 KB
testcase_06 AC 76 ms
15,124 KB
testcase_07 AC 74 ms
15,172 KB
testcase_08 AC 73 ms
15,216 KB
testcase_09 AC 73 ms
15,044 KB
testcase_10 AC 73 ms
15,152 KB
testcase_11 AC 71 ms
15,088 KB
testcase_12 AC 73 ms
15,124 KB
testcase_13 AC 77 ms
15,244 KB
testcase_14 AC 75 ms
15,268 KB
testcase_15 WA -
testcase_16 AC 96 ms
17,528 KB
testcase_17 AC 132 ms
20,652 KB
testcase_18 AC 220 ms
29,968 KB
testcase_19 AC 270 ms
34,048 KB
testcase_20 AC 249 ms
33,040 KB
testcase_21 WA -
testcase_22 AC 265 ms
34,320 KB
testcase_23 AC 173 ms
34,060 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:D.max<q/2||(q%2>0&&f.min>q)?-1:2
0