結果
| 問題 |
No.2648 [Cherry 6th Tune D] 一次元の馬
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-23 21:50:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,088 ms / 2,000 ms |
| コード長 | 385 bytes |
| コンパイル時間 | 220 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 296,044 KB |
| 最終ジャッジ日時 | 2025-06-20 02:03:16 |
| 合計ジャッジ時間 | 32,960 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
T=int(input())
for _ in range(T):
N=int(input())
A=list(map(int,input().split()))
ng=-1
ok=int(1e18)
def f(x):
B=[A[0]+x]
for i in range(1,N):
b=A[i]+(i+1)*x
if B[-1]>=b:return False
B.append(b)
return True
while ok-ng>1:
m=(ok+ng)//2
if f(m):ok=m
else:ng=m
print(ok)