提出 #75643655


ソースコード 拡げる

n,k=map(int,input().split())
a=list(map(int,input().split()))

def is_ok(t):
    sumk=0
    for i in range(n):
        sumk+=max(0,((t-a[i]-1)//(i+1)) +1)
        if sumk>k:
            return False
    else:
        return True

def nibtan():
    ok=0
    ng=2*10**18+1
    while abs(ok-ng)>1:
        mid=(ok+ng)//2
        if is_ok(mid):
            ok=mid
        else:
            ng=mid
    return ok
def main():
    print(nibtan())
main()

提出情報

提出日時
問題 D - Raise Minimum
ユーザ st0123
言語 Python (PyPy 3.11-v7.3.20)
得点 400
コード長 469 Byte
結果 AC
実行時間 207 ms
メモリ 141040 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 3
AC × 47
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_corner_00.txt, 01_corner_01.txt, 01_corner_02.txt, 01_corner_03.txt, 01_corner_04.txt, 01_corner_05.txt, 01_corner_06.txt, 01_corner_07.txt, 01_corner_08.txt, 01_corner_09.txt, 01_corner_10.txt, 02_hack_00.txt, 02_hack_01.txt, 02_hack_02.txt, 02_hack_03.txt, 02_hack_04.txt, 02_hack_05.txt, 02_hack_06.txt, 02_hack_07.txt, 02_hack_08.txt, 02_hack_09.txt, 02_hack_10.txt, 02_hack_11.txt, 02_hack_12.txt, 03_random_00.txt, 03_random_01.txt, 03_random_02.txt, 03_random_03.txt, 03_random_04.txt, 03_random_05.txt, 03_random_06.txt, 03_random_07.txt, 03_random_08.txt, 03_random_09.txt, 03_random_10.txt, 03_random_11.txt, 03_random_12.txt, 03_random_13.txt, 03_random_14.txt, 03_random_15.txt, 03_random_16.txt, 03_random_17.txt, 03_random_18.txt, 03_random_19.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 50 ms 79536 KiB
00_sample_01.txt AC 50 ms 79536 KiB
00_sample_02.txt AC 50 ms 79508 KiB
01_corner_00.txt AC 50 ms 79744 KiB
01_corner_01.txt AC 74 ms 124304 KiB
01_corner_02.txt AC 50 ms 79508 KiB
01_corner_03.txt AC 148 ms 136868 KiB
01_corner_04.txt AC 103 ms 124576 KiB
01_corner_05.txt AC 104 ms 124592 KiB
01_corner_06.txt AC 124 ms 128780 KiB
01_corner_07.txt AC 124 ms 128880 KiB
01_corner_08.txt AC 125 ms 128908 KiB
01_corner_09.txt AC 124 ms 128784 KiB
01_corner_10.txt AC 124 ms 128848 KiB
02_hack_00.txt AC 50 ms 79640 KiB
02_hack_01.txt AC 50 ms 79644 KiB
02_hack_02.txt AC 50 ms 79680 KiB
02_hack_03.txt AC 50 ms 79684 KiB
02_hack_04.txt AC 73 ms 121072 KiB
02_hack_05.txt AC 73 ms 118624 KiB
02_hack_06.txt AC 58 ms 92848 KiB
02_hack_07.txt AC 90 ms 124908 KiB
02_hack_08.txt AC 95 ms 132080 KiB
02_hack_09.txt AC 72 ms 105008 KiB
02_hack_10.txt AC 112 ms 141040 KiB
02_hack_11.txt AC 74 ms 105140 KiB
02_hack_12.txt AC 77 ms 106088 KiB
03_random_00.txt AC 195 ms 136436 KiB
03_random_01.txt AC 196 ms 137736 KiB
03_random_02.txt AC 158 ms 136396 KiB
03_random_03.txt AC 75 ms 97220 KiB
03_random_04.txt AC 200 ms 136320 KiB
03_random_05.txt AC 128 ms 117224 KiB
03_random_06.txt AC 170 ms 136352 KiB
03_random_07.txt AC 58 ms 89616 KiB
03_random_08.txt AC 207 ms 136604 KiB
03_random_09.txt AC 88 ms 101364 KiB
03_random_10.txt AC 127 ms 136144 KiB
03_random_11.txt AC 87 ms 108584 KiB
03_random_12.txt AC 206 ms 136320 KiB
03_random_13.txt AC 132 ms 120400 KiB
03_random_14.txt AC 178 ms 136620 KiB
03_random_15.txt AC 98 ms 120004 KiB
03_random_16.txt AC 125 ms 136308 KiB
03_random_17.txt AC 123 ms 136164 KiB
03_random_18.txt AC 124 ms 136200 KiB
03_random_19.txt AC 123 ms 136208 KiB