結果

問題 No.68 よくある棒を切る問題 (2)
ユーザー gigurururugigurururu
提出日時 2014-11-25 13:33:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 2,175 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 6,620 KB
実行使用メモリ 52,232 KB
最終ジャッジ日時 2023-08-30 22:54:38
合計ジャッジ時間 31,194 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,038 ms
52,124 KB
testcase_01 AC 1,994 ms
52,232 KB
testcase_02 AC 1,968 ms
52,156 KB
testcase_03 AC 2,049 ms
52,232 KB
testcase_04 AC 2,068 ms
52,104 KB
testcase_05 AC 2,175 ms
52,156 KB
testcase_06 AC 1,912 ms
49,912 KB
testcase_07 AC 1,985 ms
51,160 KB
testcase_08 AC 1,832 ms
49,136 KB
testcase_09 AC 1,890 ms
50,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq

n=input()
l=[(-float(i),1) for i in raw_input().split()]
q=input()

heapq.heapify(l)
a=[]

for _ in range(500000):
    s,n=heapq.heappop(l)
    a.append(s)
    heapq.heappush(l,(s*n/(n+1),n+1))

for i in map(int,raw_input().split()):
    print -a[i-1]
0