結果
| 問題 | No.3471 ジャッジサーバーの負荷分散 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-06 22:19:16 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 316 ms / 2,000 ms |
| コード長 | 260 bytes |
| 記録 | |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 85,280 KB |
| 実行使用メモリ | 117,984 KB |
| 最終ジャッジ日時 | 2026-03-06 22:19:19 |
| 合計ジャッジ時間 | 3,227 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
from heapq import heappush,heappop
N,M=map(int,input().split())
T=list(map(int,input().split()))
S=[]
for i in range(M):
heappush(S,(0,i))
for t in T:
time,s=heappop(S)
heappush(S,(time+t,i))
ans=0
for time,s in S:
ans=max(ans,time)
print(ans)