Submission #76778963


Source Code Expand

N, K = map(int, input().split())
a_list = list(map(int, input().split()))

mi = 0
ma = 10 ** 20

while ma - mi > 1:
    mid = (ma + mi) // 2
    count = 0
    for n in range(N):
        a = a_list[n]
        count += max(0, (mid - a - 1) // (n + 1) + 1)

    if count > K:
        ma = mid
    else:
        mi = mid

print(mi)

Submission Info

Submission Time
Task G - Raise Minimum
User kurome_rome
Language Python (PyPy 3.11-v7.3.20)
Score 400
Code Size 345 Byte
Status AC
Exec Time 962 ms
Memory 142852 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 3
AC × 47
Set Name Test Cases
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
Case Name Status Exec Time Memory
00_sample_00.txt AC 50 ms 79508 KiB
00_sample_01.txt AC 50 ms 79740 KiB
00_sample_02.txt AC 54 ms 87168 KiB
01_corner_00.txt AC 50 ms 79612 KiB
01_corner_01.txt AC 622 ms 135840 KiB
01_corner_02.txt AC 51 ms 79716 KiB
01_corner_03.txt AC 671 ms 138028 KiB
01_corner_04.txt AC 642 ms 135684 KiB
01_corner_05.txt AC 656 ms 135924 KiB
01_corner_06.txt AC 730 ms 136780 KiB
01_corner_07.txt AC 746 ms 136560 KiB
01_corner_08.txt AC 731 ms 136912 KiB
01_corner_09.txt AC 715 ms 136948 KiB
01_corner_10.txt AC 714 ms 136916 KiB
02_hack_00.txt AC 51 ms 79748 KiB
02_hack_01.txt AC 51 ms 79748 KiB
02_hack_02.txt AC 50 ms 79748 KiB
02_hack_03.txt AC 50 ms 79600 KiB
02_hack_04.txt AC 555 ms 132956 KiB
02_hack_05.txt AC 499 ms 130272 KiB
02_hack_06.txt AC 149 ms 110380 KiB
02_hack_07.txt AC 560 ms 132900 KiB
02_hack_08.txt AC 620 ms 137328 KiB
02_hack_09.txt AC 273 ms 117968 KiB
02_hack_10.txt AC 643 ms 142852 KiB
02_hack_11.txt AC 254 ms 117280 KiB
02_hack_12.txt AC 267 ms 117968 KiB
03_random_00.txt AC 869 ms 136412 KiB
03_random_01.txt AC 917 ms 137548 KiB
03_random_02.txt AC 873 ms 136712 KiB
03_random_03.txt AC 207 ms 112124 KiB
03_random_04.txt AC 906 ms 136684 KiB
03_random_05.txt AC 450 ms 125268 KiB
03_random_06.txt AC 843 ms 136312 KiB
03_random_07.txt AC 121 ms 108536 KiB
03_random_08.txt AC 962 ms 136624 KiB
03_random_09.txt AC 271 ms 114708 KiB
03_random_10.txt AC 770 ms 136620 KiB
03_random_11.txt AC 324 ms 119512 KiB
03_random_12.txt AC 881 ms 136484 KiB
03_random_13.txt AC 507 ms 127440 KiB
03_random_14.txt AC 850 ms 136528 KiB
03_random_15.txt AC 469 ms 127364 KiB
03_random_16.txt AC 678 ms 136552 KiB
03_random_17.txt AC 680 ms 136596 KiB
03_random_18.txt AC 686 ms 136436 KiB
03_random_19.txt AC 686 ms 136424 KiB