結果

問題 No.2217 Suffix+
ユーザー chankei271828chankei271828
提出日時 2023-02-17 21:35:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,581 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 93,268 KB
最終ジャッジ日時 2023-09-26 18:46:34
合計ジャッジ時間 17,047 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,336 KB
testcase_01 AC 71 ms
71,264 KB
testcase_02 AC 77 ms
71,140 KB
testcase_03 AC 73 ms
71,132 KB
testcase_04 AC 75 ms
71,324 KB
testcase_05 AC 74 ms
71,496 KB
testcase_06 AC 72 ms
71,124 KB
testcase_07 AC 71 ms
71,348 KB
testcase_08 AC 73 ms
71,236 KB
testcase_09 AC 73 ms
71,444 KB
testcase_10 AC 72 ms
71,012 KB
testcase_11 AC 72 ms
71,480 KB
testcase_12 AC 73 ms
71,356 KB
testcase_13 AC 75 ms
71,296 KB
testcase_14 AC 153 ms
78,944 KB
testcase_15 AC 152 ms
79,008 KB
testcase_16 AC 224 ms
83,864 KB
testcase_17 AC 188 ms
81,176 KB
testcase_18 AC 170 ms
80,352 KB
testcase_19 AC 713 ms
88,112 KB
testcase_20 AC 691 ms
86,252 KB
testcase_21 AC 232 ms
76,952 KB
testcase_22 AC 698 ms
87,740 KB
testcase_23 AC 652 ms
84,116 KB
testcase_24 AC 348 ms
92,684 KB
testcase_25 AC 349 ms
92,860 KB
testcase_26 AC 348 ms
92,732 KB
testcase_27 AC 347 ms
92,704 KB
testcase_28 AC 349 ms
92,704 KB
testcase_29 AC 1,269 ms
93,268 KB
testcase_30 AC 1,274 ms
92,976 KB
testcase_31 AC 1,261 ms
93,256 KB
testcase_32 AC 1,271 ms
93,032 KB
testcase_33 AC 1,288 ms
93,120 KB
testcase_34 AC 346 ms
93,244 KB
testcase_35 AC 75 ms
71,004 KB
testcase_36 AC 1,581 ms
93,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
ok=0
ng=10**20
while ng-ok!=1:
    ima=(ng+ok)//2
    plus=0
    num=0
    #前から、ima以上にしていく
    for i in range(N):
        if A[i]+plus<ima:
            t=(ima-(A[i]+plus)+i)//(i+1)
            plus+=t*(i+1)
            num+=t
    if num<=K:
        ok=ima
    else:
        ng=ima
print(ok)
0