提出 #75638974


ソースコード 拡げる

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

lo,hi = min(L),10**25
while lo <= hi:
  m = (lo+hi)//2
  c = 0
  for i in range(n):
    d = m-L[i]
    if d > 0:
      c += (d-1)//(i+1)+1
  if c == k or m == lo:
    print(m)
    exit()
  if c > k: hi = m
  else: lo = m

提出情報

提出日時
問題 D - Raise Minimum
ユーザ Cenix820
言語 Python (PyPy 3.11-v7.3.20)
得点 400
コード長 302 Byte
結果 AC
実行時間 827 ms
メモリ 143076 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 47 ms 79832 KiB
00_sample_01.txt AC 47 ms 79748 KiB
00_sample_02.txt AC 50 ms 87404 KiB
01_corner_00.txt AC 46 ms 79612 KiB
01_corner_01.txt AC 779 ms 135720 KiB
01_corner_02.txt AC 48 ms 79360 KiB
01_corner_03.txt AC 824 ms 138172 KiB
01_corner_04.txt AC 802 ms 135960 KiB
01_corner_05.txt AC 806 ms 135956 KiB
01_corner_06.txt AC 788 ms 136968 KiB
01_corner_07.txt AC 789 ms 136984 KiB
01_corner_08.txt AC 787 ms 136968 KiB
01_corner_09.txt AC 792 ms 136944 KiB
01_corner_10.txt AC 790 ms 137100 KiB
02_hack_00.txt AC 48 ms 79804 KiB
02_hack_01.txt AC 47 ms 79548 KiB
02_hack_02.txt AC 48 ms 79728 KiB
02_hack_03.txt AC 48 ms 79680 KiB
02_hack_04.txt AC 658 ms 132884 KiB
02_hack_05.txt AC 583 ms 130160 KiB
02_hack_06.txt AC 157 ms 110348 KiB
02_hack_07.txt AC 667 ms 132880 KiB
02_hack_08.txt AC 740 ms 137364 KiB
02_hack_09.txt AC 320 ms 117640 KiB
02_hack_10.txt AC 778 ms 143076 KiB
02_hack_11.txt AC 297 ms 117360 KiB
02_hack_12.txt AC 304 ms 117772 KiB
03_random_00.txt AC 632 ms 136704 KiB
03_random_01.txt AC 609 ms 137772 KiB
03_random_02.txt AC 534 ms 136500 KiB
03_random_03.txt AC 156 ms 112772 KiB
03_random_04.txt AC 634 ms 136536 KiB
03_random_05.txt AC 364 ms 125228 KiB
03_random_06.txt AC 540 ms 136836 KiB
03_random_07.txt AC 91 ms 108696 KiB
03_random_08.txt AC 674 ms 136624 KiB
03_random_09.txt AC 203 ms 115216 KiB
03_random_10.txt AC 441 ms 136748 KiB
03_random_11.txt AC 225 ms 119508 KiB
03_random_12.txt AC 678 ms 136480 KiB
03_random_13.txt AC 403 ms 127500 KiB
03_random_14.txt AC 598 ms 136548 KiB
03_random_15.txt AC 286 ms 127572 KiB
03_random_16.txt AC 819 ms 136836 KiB
03_random_17.txt AC 827 ms 136832 KiB
03_random_18.txt AC 822 ms 136752 KiB
03_random_19.txt AC 819 ms 136496 KiB