結果
問題 | No.1808 Fullgold Alchemist |
ユーザー |
|
提出日時 | 2022-01-14 21:39:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 114 ms / 2,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 354 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 102,784 KB |
最終ジャッジ日時 | 2024-11-20 08:41:04 |
合計ジャッジ時間 | 4,230 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
N,M = map(int,input().split()) A = list(map(int,input().split())) def check(L): stack = 0 for a in A: if stack + a < L * M: return False else: stack = stack + a - L * M return True end = 10 ** 9 + 1 start = 0 while end - start > 1: mid = (start + end) // 2 if check(mid): start = mid else: end = mid print(start)