結果
| 問題 | No.68 よくある棒を切る問題 (2) | 
| コンテスト | |
| ユーザー |  ytft | 
| 提出日時 | 2022-11-07 09:58:37 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3,477 ms / 5,000 ms | 
| コード長 | 383 bytes | 
| コンパイル時間 | 431 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 171,404 KB | 
| 最終ジャッジ日時 | 2024-07-20 18:27:29 | 
| 合計ジャッジ時間 | 44,853 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
import sys,heapq input=lambda:sys.stdin.readline().rstrip() N=int(input()) L=list(map(int,input().split())) Q=int(input()) K=list(map(int,input().split())) check=[] M=max(K) h=[] for i in range(N): heapq.heappush(h,[-L[i],1]) while len(check)<M: temp=heapq.heappop(h) check.append(-temp[0]) heapq.heappush(h,[temp[0]*temp[1]/(temp[1]+1),temp[1]+1]) for i in K: print(check[i-1])
