結果

問題 No.513 宝探し2
ユーザー smz_8110smz_8110
提出日時 2017-05-10 15:41:07
言語 Ruby
(3.3.0)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 11,188 KB
実行使用メモリ 31,572 KB
平均クエリ数 19.50
最終ジャッジ日時 2023-09-24 01:15:18
合計ジャッジ時間 3,279 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
31,344 KB
testcase_01 AC 104 ms
31,500 KB
testcase_02 AC 103 ms
31,000 KB
testcase_03 AC 107 ms
30,960 KB
testcase_04 AC 103 ms
31,488 KB
testcase_05 AC 105 ms
30,632 KB
testcase_06 AC 105 ms
31,164 KB
testcase_07 AC 104 ms
30,956 KB
testcase_08 AC 105 ms
31,572 KB
testcase_09 AC 103 ms
30,828 KB
testcase_10 AC 106 ms
30,796 KB
testcase_11 AC 104 ms
30,960 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

puts "0 0"
$>.flush
s=[0,gets.to_i]
puts "100000 0"
$>.flush
e=[100000,gets.to_i]

while s[0]+1<e[0]
  n=(s[0]+e[0])/2
  puts "#{n} 0"
  $>.flush
  if s[1]<e[1]
    e=[n,gets.to_i]
  else
    s=[n,gets.to_i]
  end
end
if s[1]<e[1]
  puts s*" "
else
  puts e*" "
end
0