結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー NakLon131NakLon131
提出日時 2024-02-23 22:29:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 739 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 258,256 KB
最終ジャッジ日時 2024-02-23 22:29:59
合計ジャッジ時間 13,033 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 280 ms
76,508 KB
testcase_02 AC 172 ms
76,320 KB
testcase_03 AC 174 ms
76,320 KB
testcase_04 AC 327 ms
243,940 KB
testcase_05 AC 298 ms
257,832 KB
testcase_06 AC 242 ms
161,144 KB
testcase_07 AC 303 ms
257,484 KB
testcase_08 AC 235 ms
162,252 KB
testcase_09 AC 307 ms
258,256 KB
testcase_10 AC 293 ms
257,908 KB
testcase_11 AC 293 ms
208,372 KB
testcase_12 AC 356 ms
256,228 KB
testcase_13 AC 306 ms
257,504 KB
testcase_14 AC 283 ms
258,160 KB
testcase_15 AC 294 ms
258,160 KB
testcase_16 AC 292 ms
258,156 KB
testcase_17 AC 301 ms
258,164 KB
testcase_18 AC 282 ms
258,156 KB
testcase_19 AC 283 ms
258,156 KB
testcase_20 AC 284 ms
258,160 KB
testcase_21 AC 293 ms
258,156 KB
testcase_22 AC 285 ms
258,164 KB
testcase_23 AC 286 ms
258,156 KB
testcase_24 AC 292 ms
258,156 KB
testcase_25 AC 282 ms
158,436 KB
testcase_26 AC 288 ms
258,156 KB
testcase_27 AC 347 ms
257,112 KB
testcase_28 AC 288 ms
258,184 KB
testcase_29 AC 328 ms
257,476 KB
testcase_30 AC 289 ms
258,184 KB
testcase_31 AC 290 ms
258,184 KB
testcase_32 AC 290 ms
258,184 KB
testcase_33 AC 310 ms
258,204 KB
testcase_34 AC 285 ms
258,184 KB
testcase_35 AC 739 ms
77,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def isok(x, a) -> bool:
    aa = []
    for i in range(len(a)):
        aa.append(a[i] + x * (i+1)) 
    
    for i in range(1, len(aa)):
        if aa[i-1] >= aa[i]:
            return False
    return True   

t = int(input())
for i in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    
    ng = -1
    ok = 1 << 30
    for _ in range(30):
        md = (ng + ok) // 2
        if isok(md, a):
            ok = md
        else:
            ng = md
    print(ok)
    

0