結果

問題 No.1808 Fullgold Alchemist
ユーザー hiragnhiragn
提出日時 2022-12-03 22:42:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 482 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 32,572 KB
最終ジャッジ日時 2024-04-19 09:16:35
合計ジャッジ時間 9,037 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,496 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 36 ms
10,752 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 66 ms
14,496 KB
testcase_06 AC 211 ms
26,192 KB
testcase_07 AC 90 ms
26,196 KB
testcase_08 AC 1,024 ms
32,572 KB
testcase_09 AC 267 ms
32,436 KB
testcase_10 AC 143 ms
32,360 KB
testcase_11 AC 256 ms
32,568 KB
testcase_12 AC 108 ms
28,312 KB
testcase_13 AC 329 ms
28,280 KB
testcase_14 AC 425 ms
28,320 KB
testcase_15 AC 274 ms
28,440 KB
testcase_16 AC 41 ms
11,264 KB
testcase_17 AC 35 ms
10,752 KB
testcase_18 AC 72 ms
13,488 KB
testcase_19 AC 35 ms
10,880 KB
testcase_20 AC 117 ms
14,740 KB
testcase_21 AC 55 ms
12,156 KB
testcase_22 AC 34 ms
10,752 KB
testcase_23 AC 44 ms
11,776 KB
testcase_24 AC 43 ms
11,136 KB
testcase_25 AC 42 ms
11,264 KB
testcase_26 AC 103 ms
14,264 KB
testcase_27 AC 122 ms
14,620 KB
testcase_28 AC 392 ms
30,736 KB
testcase_29 AC 162 ms
17,204 KB
testcase_30 AC 123 ms
16,352 KB
testcase_31 AC 460 ms
29,176 KB
testcase_32 AC 219 ms
21,544 KB
testcase_33 AC 490 ms
26,092 KB
testcase_34 AC 364 ms
31,152 KB
testcase_35 AC 347 ms
24,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate


def main():
    n, m = map(int, input().split())
    a = [0] + list(map(int, input().split()))
    acc = list(accumulate(a))
    
    def isok(k):
        return all(acc[i] >= m * k * i for i in range(1, n))

    left = 0
    right = 10 ** 9 + 1
    while right - left > 1:
        mid = (left + right) // 2
        if isok(mid):
            left = mid
        else:
            right = mid
    print(left)


if __name__ == "__main__":
    main()
0