結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー titiatitia
提出日時 2024-02-23 21:28:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 330 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 459 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 32,116 KB
最終ジャッジ日時 2024-02-23 21:29:03
合計ジャッジ時間 8,441 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,856 KB
testcase_01 AC 185 ms
9,984 KB
testcase_02 AC 157 ms
10,240 KB
testcase_03 AC 156 ms
10,240 KB
testcase_04 AC 175 ms
23,224 KB
testcase_05 AC 172 ms
30,208 KB
testcase_06 AC 176 ms
20,448 KB
testcase_07 AC 176 ms
28,696 KB
testcase_08 AC 165 ms
19,588 KB
testcase_09 AC 175 ms
31,288 KB
testcase_10 AC 168 ms
30,428 KB
testcase_11 AC 168 ms
23,344 KB
testcase_12 AC 177 ms
29,116 KB
testcase_13 AC 175 ms
28,656 KB
testcase_14 AC 177 ms
31,868 KB
testcase_15 AC 175 ms
31,868 KB
testcase_16 AC 176 ms
31,868 KB
testcase_17 AC 178 ms
31,868 KB
testcase_18 AC 183 ms
31,868 KB
testcase_19 AC 182 ms
31,868 KB
testcase_20 AC 178 ms
31,868 KB
testcase_21 AC 176 ms
31,868 KB
testcase_22 AC 174 ms
31,868 KB
testcase_23 AC 176 ms
31,868 KB
testcase_24 AC 126 ms
31,868 KB
testcase_25 AC 116 ms
17,232 KB
testcase_26 AC 127 ms
31,868 KB
testcase_27 AC 124 ms
28,980 KB
testcase_28 AC 226 ms
31,860 KB
testcase_29 AC 210 ms
28,776 KB
testcase_30 AC 225 ms
31,860 KB
testcase_31 AC 219 ms
31,860 KB
testcase_32 AC 224 ms
31,860 KB
testcase_33 AC 219 ms
32,116 KB
testcase_34 AC 224 ms
31,860 KB
testcase_35 AC 330 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T=int(input())
for tests in range(T):
    N=int(input())
    A=list(map(int,input().split()))

    ANS=0

    for i in range(1,N):
        if A[i]-A[i-1]<=0:
            ANS=max(ANS,A[i-1]-A[i]+1)

    print(ANS)
0