結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー hato336hato336
提出日時 2024-02-23 21:28:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 633 ms / 2,000 ms
コード長 744 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 185,272 KB
最終ジャッジ日時 2024-02-23 21:29:08
合計ジャッジ時間 12,485 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
85,176 KB
testcase_01 AC 315 ms
90,296 KB
testcase_02 AC 239 ms
89,656 KB
testcase_03 AC 233 ms
89,656 KB
testcase_04 AC 265 ms
163,768 KB
testcase_05 AC 271 ms
176,184 KB
testcase_06 AC 264 ms
146,744 KB
testcase_07 AC 268 ms
171,192 KB
testcase_08 AC 254 ms
140,236 KB
testcase_09 AC 273 ms
182,456 KB
testcase_10 AC 270 ms
176,696 KB
testcase_11 AC 268 ms
167,216 KB
testcase_12 AC 264 ms
170,168 KB
testcase_13 AC 268 ms
173,240 KB
testcase_14 AC 264 ms
185,272 KB
testcase_15 AC 269 ms
185,272 KB
testcase_16 AC 278 ms
185,272 KB
testcase_17 AC 268 ms
185,272 KB
testcase_18 AC 271 ms
185,272 KB
testcase_19 AC 267 ms
185,272 KB
testcase_20 AC 268 ms
185,272 KB
testcase_21 AC 268 ms
185,272 KB
testcase_22 AC 284 ms
185,272 KB
testcase_23 AC 268 ms
185,272 KB
testcase_24 AC 263 ms
185,272 KB
testcase_25 AC 259 ms
134,712 KB
testcase_26 AC 270 ms
185,272 KB
testcase_27 AC 276 ms
180,664 KB
testcase_28 AC 276 ms
185,272 KB
testcase_29 AC 295 ms
171,320 KB
testcase_30 AC 282 ms
185,272 KB
testcase_31 AC 276 ms
185,272 KB
testcase_32 AC 280 ms
185,272 KB
testcase_33 AC 280 ms
185,016 KB
testcase_34 AC 287 ms
185,272 KB
testcase_35 AC 633 ms
96,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
input = sys.stdin.readline
t = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
#    alist.append(list(map(int,input().split())))
for i in range(t):
    n = int(input())
    a = list(map(int,input().split()))
    l,r = 0,10**10
    for j in range(42):
        m = (l+r)//2
        b = [a[k] + (k+1)*m for k in range(n)]
        cnt = 0
        for k in range(n-1):
            if b[k] < b[k+1]:
                cnt += 1
        if cnt == n-1:
            r = m
        else:
            l = m
    print(r)
0