結果
| 問題 |
No.3221 Count Turns
|
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-08-01 21:46:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 450 ms / 2,000 ms |
| コード長 | 533 bytes |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 99,948 KB |
| 最終ジャッジ日時 | 2025-08-01 21:47:08 |
| 合計ジャッジ時間 | 11,310 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 36 |
ソースコード
N,H,T=map(int,input().split()) A=list(map(int,input().split())) v=[0]*N L=[] for i in range(N): x=A[i] count=(H+x-1)//x v[i]=count L.append((-count*x,i)) L.sort() B=[] for i in range(N): pos=L[i][1] B.append(pos) p=[0]*N for i in range(N): p[B[i]]=i from heapq import heappush,heappop S=[] for i in range(N): count=v[i] heappush(S,count*10**6+p[i]) result=[0]*N for _ in range(T): w=heappop(S) pos=w%(10**6) count=w//(10**6) y=B[pos] result[y]+=1 count+=v[y] heappush(S,count*10**6+pos) print(*result)
ゼット