結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー Akijin_007Akijin_007
提出日時 2024-02-23 21:36:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,278 ms / 2,000 ms
コード長 590 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 354,080 KB
最終ジャッジ日時 2024-04-16 16:55:41
合計ジャッジ時間 36,017 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
57,728 KB
testcase_01 AC 316 ms
78,464 KB
testcase_02 AC 385 ms
77,184 KB
testcase_03 AC 537 ms
77,696 KB
testcase_04 AC 791 ms
245,640 KB
testcase_05 AC 975 ms
349,272 KB
testcase_06 AC 789 ms
210,068 KB
testcase_07 AC 928 ms
330,080 KB
testcase_08 AC 754 ms
191,008 KB
testcase_09 AC 964 ms
348,660 KB
testcase_10 AC 963 ms
337,540 KB
testcase_11 AC 866 ms
246,500 KB
testcase_12 AC 961 ms
294,636 KB
testcase_13 AC 943 ms
331,956 KB
testcase_14 AC 949 ms
309,104 KB
testcase_15 AC 963 ms
308,844 KB
testcase_16 AC 968 ms
309,096 KB
testcase_17 AC 964 ms
309,220 KB
testcase_18 AC 957 ms
308,852 KB
testcase_19 AC 953 ms
309,104 KB
testcase_20 AC 953 ms
309,228 KB
testcase_21 AC 956 ms
309,104 KB
testcase_22 AC 948 ms
309,100 KB
testcase_23 AC 947 ms
308,836 KB
testcase_24 AC 1,108 ms
352,676 KB
testcase_25 AC 757 ms
169,644 KB
testcase_26 AC 986 ms
313,668 KB
testcase_27 AC 957 ms
291,816 KB
testcase_28 AC 1,130 ms
354,080 KB
testcase_29 AC 1,067 ms
329,792 KB
testcase_30 AC 1,076 ms
348,068 KB
testcase_31 AC 1,089 ms
348,176 KB
testcase_32 AC 1,095 ms
345,120 KB
testcase_33 AC 1,252 ms
350,248 KB
testcase_34 AC 1,278 ms
340,132 KB
testcase_35 AC 439 ms
83,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

T = int(input())

a = []
for i in range(T):
    N = int(input())
    A = list(map(int, input().split()))

    max1 = 10 ** 18
    min1 = -1
    while max1 - min1 > 1:
        h = (max1 + min1) // 2
        u = [0] * N
        for j in range(N):
            u[j] = A[j] + j * h
        f = 1
        for j in range(N-1):
            if u[j] >= u[j+1]:
                f = 0
                break

        if f:
            max1 = h
        else:
            min1 = h

    a.append(max1)


for x in a:
    print(x)


0