結果

問題 No.850 企業コンテスト2位
ユーザー letrangerjpletrangerjp
提出日時 2019-07-05 23:45:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 162 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 11,268 KB
実行使用メモリ 31,420 KB
平均クエリ数 200.11
最終ジャッジ日時 2023-09-23 17:44:25
合計ジャッジ時間 4,861 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
31,292 KB
testcase_01 AC 103 ms
31,024 KB
testcase_02 AC 102 ms
31,276 KB
testcase_03 AC 104 ms
30,792 KB
testcase_04 AC 101 ms
31,232 KB
testcase_05 AC 101 ms
30,928 KB
testcase_06 AC 103 ms
31,216 KB
testcase_07 AC 108 ms
31,384 KB
testcase_08 AC 112 ms
30,808 KB
testcase_09 AC 108 ms
30,900 KB
testcase_10 AC 111 ms
31,128 KB
testcase_11 AC 111 ms
31,136 KB
testcase_12 AC 110 ms
31,420 KB
testcase_13 AC 112 ms
30,940 KB
testcase_14 AC 110 ms
31,304 KB
testcase_15 AC 110 ms
30,772 KB
testcase_16 AC 112 ms
30,776 KB
testcase_17 AC 113 ms
30,844 KB
testcase_18 AC 109 ms
30,728 KB
testcase_19 AC 114 ms
30,792 KB
testcase_20 AC 115 ms
30,828 KB
testcase_21 AC 117 ms
30,804 KB
testcase_22 AC 111 ms
30,812 KB
testcase_23 AC 111 ms
31,040 KB
testcase_24 AC 115 ms
31,164 KB
testcase_25 AC 115 ms
30,600 KB
testcase_26 AC 112 ms
31,296 KB
testcase_27 AC 100 ms
31,268 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

$>.sync=h=Hash.new []
f=->a{b=a.each_slice(2).map{|x,y|y ?(puts"? #{x} #{y}"
h[z=gets.to_i]+=[x==z ?y:x]
z):x}
b[1]?f[b]:b[0]}
puts"! #{f[h[f[[*1..gets.to_i]]]]}"
0