結果
| 問題 |
No.1808 Fullgold Alchemist
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-14 21:37:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 172 ms |
| コンパイル使用メモリ | 82,256 KB |
| 実行使用メモリ | 102,476 KB |
| 最終ジャッジ日時 | 2024-11-20 08:31:32 |
| 合計ジャッジ時間 | 4,098 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 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
start = -1
while end - start > 1:
mid = (start + end) // 2
if check(mid):
end = mid
else:
start = mid
print(end)