結果

問題 No.2015 Stair Counter
ユーザー lloyzlloyz
提出日時 2022-07-22 21:54:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 218 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 107,236 KB
最終ジャッジ日時 2023-09-17 09:49:14
合計ジャッジ時間 5,292 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,296 KB
testcase_01 AC 170 ms
77,972 KB
testcase_02 AC 192 ms
78,204 KB
testcase_03 AC 203 ms
78,656 KB
testcase_04 AC 154 ms
77,852 KB
testcase_05 AC 142 ms
77,848 KB
testcase_06 AC 213 ms
78,696 KB
testcase_07 AC 218 ms
78,564 KB
testcase_08 AC 211 ms
78,468 KB
testcase_09 AC 90 ms
76,624 KB
testcase_10 AC 89 ms
76,688 KB
testcase_11 AC 94 ms
76,760 KB
testcase_12 AC 86 ms
77,224 KB
testcase_13 AC 90 ms
77,596 KB
testcase_14 AC 93 ms
78,780 KB
testcase_15 AC 97 ms
94,088 KB
testcase_16 AC 110 ms
103,740 KB
testcase_17 AC 100 ms
97,712 KB
testcase_18 AC 104 ms
97,976 KB
testcase_19 AC 114 ms
107,236 KB
testcase_20 AC 108 ms
104,184 KB
testcase_21 AC 157 ms
77,824 KB
testcase_22 AC 143 ms
77,904 KB
testcase_23 AC 204 ms
78,484 KB
testcase_24 AC 172 ms
78,108 KB
testcase_25 AC 171 ms
77,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for _ in range(t):
    n, m = map(int, input().split())
    A = list(map(int, input().split()))
    prev = m - A[0]
    flag = True
    for i in range(1, n):
        if prev > A[i]:
            flag = False
            break
        prev = m - A[i]
    if flag:
        print("Yes")
    else:
        print("No")
0