結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー hirayuu_ychirayuu_yc
提出日時 2023-07-31 05:34:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 388 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 107,520 KB
最終ジャッジ日時 2024-04-18 06:32:14
合計ジャッジ時間 6,691 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
51,968 KB
testcase_01 AC 157 ms
76,544 KB
testcase_02 AC 105 ms
76,800 KB
testcase_03 AC 107 ms
76,288 KB
testcase_04 AC 104 ms
98,816 KB
testcase_05 AC 106 ms
104,320 KB
testcase_06 AC 97 ms
91,776 KB
testcase_07 AC 106 ms
103,936 KB
testcase_08 AC 98 ms
91,204 KB
testcase_09 AC 109 ms
107,520 KB
testcase_10 AC 107 ms
104,576 KB
testcase_11 AC 102 ms
96,628 KB
testcase_12 AC 107 ms
96,520 KB
testcase_13 AC 108 ms
104,576 KB
testcase_14 AC 112 ms
102,272 KB
testcase_15 AC 113 ms
102,016 KB
testcase_16 AC 112 ms
102,016 KB
testcase_17 AC 111 ms
102,016 KB
testcase_18 AC 111 ms
102,016 KB
testcase_19 AC 109 ms
102,016 KB
testcase_20 AC 111 ms
102,016 KB
testcase_21 AC 110 ms
102,016 KB
testcase_22 AC 110 ms
102,016 KB
testcase_23 AC 111 ms
101,888 KB
testcase_24 AC 113 ms
101,888 KB
testcase_25 AC 97 ms
88,192 KB
testcase_26 AC 114 ms
102,016 KB
testcase_27 AC 105 ms
95,508 KB
testcase_28 AC 111 ms
102,144 KB
testcase_29 AC 106 ms
103,808 KB
testcase_30 AC 110 ms
102,144 KB
testcase_31 AC 110 ms
102,272 KB
testcase_32 AC 111 ms
102,400 KB
testcase_33 AC 104 ms
107,264 KB
testcase_34 AC 109 ms
102,016 KB
testcase_35 AC 388 ms
77,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
assert 1<=T<=10**5
Nsum=0
for i in range(T):
	N=int(input())
	Nsum+=N
	assert Nsum<=2*10**5
	assert 2<=N<=2*10**5
	A=list(map(int,input().split()))
	ans=0
	for i in range(N-1):
		assert 0<=A[i]<=10**9
		assert 0<=A[i+1]<=10**9
		ans=max(ans,A[i]-A[i+1]+1)
	print(ans)
#input()
0