結果
| 問題 |
No.3221 Count Turns
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-08-06 02:56:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 364 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 82,044 KB |
| 実行使用メモリ | 99,100 KB |
| 最終ジャッジ日時 | 2025-08-06 02:56:41 |
| 合計ジャッジ時間 | 11,187 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 30 |
ソースコード
import sys
input = sys.stdin.readline
from heapq import heappop,heappush
N,H,T=map(int,input().split())
A=list(map(int,input().split()))
B=[0]*N
Q=[]
for i in range(N):
a=A[i]
kai=(H+a-1)//a
Q.append((kai,i))
B[i]=kai
Q.sort()
ANS=[0]*N
for tests in range(T):
k,ind=heappop(Q)
ANS[ind]+=1
heappush(Q,(k+B[ind],ind))
print(*ANS)
titia