結果
| 問題 |
No.2648 [Cherry 6th Tune D] 一次元の馬
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-02-23 21:30:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 898 ms / 2,000 ms |
| コード長 | 532 bytes |
| コンパイル時間 | 360 ms |
| コンパイル使用メモリ | 82,148 KB |
| 実行使用メモリ | 289,324 KB |
| 最終ジャッジ日時 | 2025-06-20 02:01:17 |
| 合計ジャッジ時間 | 28,582 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
import sys
input = sys.stdin.readline
def check(m, B):
M = len(B)
temp = [0] * M
for i in range(M):
temp[i] = B[i] + i * m
for i in range(M - 1):
if temp[i] >= temp[i + 1]:
return False
return True
T = int(input())
for _ in range(T):
N = int(input())
A = list(map(int, input().split()))
yes = 10 ** 18
no = -1
while yes - no != 1:
mid = (yes + no)//2
if check(mid, A):
yes = mid
else:
no = mid
print(yes)
rlangevin