結果

問題 No.934 Explosive energy drink
ユーザー TANIGUCHI KousukeTANIGUCHI Kousuke
提出日時 2019-12-06 12:04:58
言語 Ruby
(3.3.0)
結果
AC  
実行時間 685 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 11,280 KB
実行使用メモリ 31,616 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:16:48
合計ジャッジ時間 8,406 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
30,744 KB
testcase_01 AC 678 ms
31,488 KB
testcase_02 AC 100 ms
31,132 KB
testcase_03 AC 367 ms
31,208 KB
testcase_04 AC 685 ms
31,140 KB
testcase_05 AC 101 ms
30,792 KB
testcase_06 AC 100 ms
31,152 KB
testcase_07 AC 98 ms
31,080 KB
testcase_08 AC 97 ms
31,376 KB
testcase_09 AC 96 ms
30,744 KB
testcase_10 AC 97 ms
30,792 KB
testcase_11 AC 99 ms
31,024 KB
testcase_12 AC 101 ms
31,460 KB
testcase_13 AC 105 ms
31,028 KB
testcase_14 AC 107 ms
31,416 KB
testcase_15 AC 253 ms
31,140 KB
testcase_16 AC 128 ms
31,344 KB
testcase_17 AC 164 ms
31,136 KB
testcase_18 AC 168 ms
31,616 KB
testcase_19 AC 287 ms
31,156 KB
testcase_20 AC 448 ms
31,236 KB
testcase_21 AC 472 ms
31,532 KB
testcase_22 AC 653 ms
31,516 KB
testcase_23 AC 663 ms
31,164 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
A = (1 .. N).to_a
S = (1 .. N).select do |n|
  puts "? #{N - 1}"
  A[n - 1] = nil
  puts A.join(' ')
  A[n - 1] = n
  $stdout.flush
  gets.to_i == 0
end
puts "! #{S.size}"
puts S.join(' ')
$stdout.flush


0