結果
| 問題 | No.2217 Suffix+ |
| コンテスト | |
| ユーザー |
310icecrystal
|
| 提出日時 | 2023-06-09 20:51:29 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1,131 ms / 2,000 ms |
| + 92µs | |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 82,420 KB |
| 実行使用メモリ | 100,452 KB |
| 最終ジャッジ日時 | 2026-10-10 03:33:32 |
| 合計ジャッジ時間 | 13,882 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
N,K = map(int,input().split())
A = [-1] + list(map(int,input().split()))
OK = 0
NG = 10**30
while NG - OK >= 2:
MID = (OK + NG) // 2
count = 0
now_plus = 0
for i in range(1,N+1):
if A[i] + now_plus < MID:
k = -(-(MID - A[i] - now_plus) // i)
count += k
now_plus += i * k
#print(MID,count)
if count > K:
NG = MID
else:
OK = MID
print(OK)
310icecrystal