結果
問題 | No.2648 [Cherry 6th Tune D] 一次元の馬 |
ユーザー |
|
提出日時 | 2024-02-23 21:28:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 806 ms / 2,000 ms |
コード長 | 744 bytes |
コンパイル時間 | 220 ms |
コンパイル使用メモリ | 81,972 KB |
実行使用メモリ | 186,240 KB |
最終ジャッジ日時 | 2025-06-20 02:00:30 |
合計ジャッジ時間 | 13,403 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
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)