結果

問題 No.68 よくある棒を切る問題 (2)
ユーザー gigurururugigurururu
提出日時 2014-11-17 14:11:35
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 11,204 KB
実行使用メモリ 40,572 KB
最終ジャッジ日時 2023-08-30 20:25:25
合計ジャッジ時間 22,375 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,376 ms
40,344 KB
testcase_01 AC 3,372 ms
40,572 KB
testcase_02 AC 3,389 ms
40,544 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
q=gets.split.map{|c|[c=c.to_f,c,1]}.sort
m=(1..5e5).map{
  a,l,d=q.pop
  s=l/d+=1
  q[(0...q.size).bsearch{|i|q[i][0]>s}||q.size,0]=[[s,l,d]]
  a
}
gets
gets.split.map{|c|p m[c.to_i-1]}
0