結果

問題 No.1808 Fullgold Alchemist
ユーザー titiatitia
提出日時 2022-01-14 21:29:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 306 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,792 KB
最終ジャッジ日時 2024-04-30 12:49:35
合計ジャッジ時間 18,244 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,496 KB
testcase_01 AC 34 ms
10,496 KB
testcase_02 AC 32 ms
10,496 KB
testcase_03 WA -
testcase_04 AC 30 ms
10,496 KB
testcase_05 AC 74 ms
14,504 KB
testcase_06 AC 151 ms
24,460 KB
testcase_07 AC 90 ms
24,460 KB
testcase_08 WA -
testcase_09 AC 1,868 ms
32,792 KB
testcase_10 WA -
testcase_11 TLE -
testcase_12 AC 163 ms
27,388 KB
testcase_13 AC 757 ms
27,380 KB
testcase_14 AC 527 ms
28,568 KB
testcase_15 AC 733 ms
27,388 KB
testcase_16 AC 44 ms
11,008 KB
testcase_17 AC 30 ms
10,624 KB
testcase_18 AC 117 ms
13,184 KB
testcase_19 AC 34 ms
10,752 KB
testcase_20 AC 219 ms
14,844 KB
testcase_21 AC 118 ms
12,032 KB
testcase_22 AC 30 ms
10,496 KB
testcase_23 AC 94 ms
11,648 KB
testcase_24 AC 51 ms
11,008 KB
testcase_25 AC 61 ms
11,264 KB
testcase_26 AC 191 ms
13,600 KB
testcase_27 AC 179 ms
14,732 KB
testcase_28 AC 1,013 ms
30,704 KB
testcase_29 AC 386 ms
17,184 KB
testcase_30 AC 237 ms
16,448 KB
testcase_31 AC 815 ms
28,664 KB
testcase_32 AC 383 ms
21,516 KB
testcase_33 AC 546 ms
25,444 KB
testcase_34 AC 807 ms
30,388 KB
testcase_35 AC 580 ms
24,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,M=map(int,input().split())
A=list(map(int,input().split()))

OK=0
NG=max(A)

while NG>OK+1:
    mid=(OK+NG)//2

    now=0
    for a in A:
        now+=a
        now-=mid

        if now<0:
            NG=mid
            break
    else:
        OK=mid

print(OK//M)
0