結果

問題 No.3471 ジャッジサーバーの負荷分散
コンテスト
ユーザー tkykwtnb
提出日時 2026-03-06 22:19:16
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 316 ms / 2,000 ms
コード長 260 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 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
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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)
0