結果
| 問題 | No.3221 Count Turns |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-08-06 02:56:30 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 364 bytes |
| 記録 | |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 95,984 KB |
| 実行使用メモリ | 107,136 KB |
| 最終ジャッジ日時 | 2026-07-13 20:18:22 |
| 合計ジャッジ時間 | 8,713 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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