結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,332 KB
testcase_01 AC 392 ms
76,440 KB
testcase_02 AC 177 ms
76,228 KB
testcase_03 AC 184 ms
76,448 KB
testcase_04 AC 171 ms
103,900 KB
testcase_05 AC 170 ms
105,240 KB
testcase_06 AC 166 ms
100,480 KB
testcase_07 AC 168 ms
110,368 KB
testcase_08 AC 159 ms
102,480 KB
testcase_09 AC 178 ms
107,180 KB
testcase_10 AC 176 ms
105,276 KB
testcase_11 AC 195 ms
101,396 KB
testcase_12 AC 177 ms
116,784 KB
testcase_13 AC 171 ms
112,904 KB
testcase_14 AC 170 ms
125,224 KB
testcase_15 AC 169 ms
123,688 KB
testcase_16 AC 175 ms
120,484 KB
testcase_17 AC 175 ms
120,488 KB
testcase_18 AC 180 ms
118,948 KB
testcase_19 AC 173 ms
122,148 KB
testcase_20 AC 168 ms
125,220 KB
testcase_21 AC 172 ms
122,148 KB
testcase_22 AC 176 ms
123,688 KB
testcase_23 AC 164 ms
126,756 KB
testcase_24 AC 185 ms
109,604 KB
testcase_25 AC 184 ms
94,436 KB
testcase_26 AC 178 ms
109,604 KB
testcase_27 AC 202 ms
109,684 KB
testcase_28 AC 187 ms
109,620 KB
testcase_29 AC 188 ms
104,936 KB
testcase_30 AC 178 ms
109,620 KB
testcase_31 AC 191 ms
109,620 KB
testcase_32 AC 181 ms
109,564 KB
testcase_33 AC 177 ms
106,896 KB
testcase_34 AC 183 ms
109,620 KB
testcase_35 AC 1,282 ms
77,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
for _ in range(t):
  n=int(input())
  a=list(map(int,input().split()))
  ok=10**9
  ng=-1
  while ok-ng>1:
    m=(ok+ng)//2
    b=[a[i]+(i+1)*m for i in range(n)]
    if all(b[i]<b[i+1] for i in range(n-1)):
      ok=m
    else:
      ng=m
  print(ok)
0