結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー 310icecrystal310icecrystal
提出日時 2024-02-25 05:05:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 893 ms / 2,000 ms
コード長 416 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 312,268 KB
最終ジャッジ日時 2024-04-17 15:03:10
合計ジャッジ時間 30,053 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
58,624 KB
testcase_01 AC 301 ms
77,056 KB
testcase_02 AC 233 ms
78,976 KB
testcase_03 AC 431 ms
78,848 KB
testcase_04 AC 740 ms
264,180 KB
testcase_05 AC 738 ms
291,380 KB
testcase_06 AC 671 ms
261,564 KB
testcase_07 AC 752 ms
312,268 KB
testcase_08 AC 761 ms
271,044 KB
testcase_09 AC 804 ms
285,124 KB
testcase_10 AC 824 ms
294,848 KB
testcase_11 AC 803 ms
275,804 KB
testcase_12 AC 847 ms
280,476 KB
testcase_13 AC 812 ms
308,636 KB
testcase_14 AC 781 ms
287,356 KB
testcase_15 AC 756 ms
290,032 KB
testcase_16 AC 756 ms
287,748 KB
testcase_17 AC 761 ms
287,612 KB
testcase_18 AC 760 ms
287,744 KB
testcase_19 AC 752 ms
288,376 KB
testcase_20 AC 769 ms
287,752 KB
testcase_21 AC 777 ms
289,912 KB
testcase_22 AC 760 ms
289,004 KB
testcase_23 AC 762 ms
287,484 KB
testcase_24 AC 863 ms
284,024 KB
testcase_25 AC 678 ms
236,832 KB
testcase_26 AC 774 ms
286,964 KB
testcase_27 AC 784 ms
279,280 KB
testcase_28 AC 856 ms
284,120 KB
testcase_29 AC 828 ms
287,720 KB
testcase_30 AC 836 ms
284,128 KB
testcase_31 AC 854 ms
283,840 KB
testcase_32 AC 890 ms
284,108 KB
testcase_33 AC 893 ms
284,372 KB
testcase_34 AC 893 ms
284,176 KB
testcase_35 AC 810 ms
78,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    N = int(input())
    A = [-1] + list(map(int,input().split()))
    OK = 10**18
    NG = -1
    while OK - NG >= 2:
        MID = (OK+NG)//2
        X = [A[i]+i*MID for i in range(1,N+1)]
        flag = True
        for i in range(N-1):
            if X[i] >= X[i+1]:
                flag = False
        if flag:
            OK = MID
        else:
            NG = MID
    print(OK)
0