結果

問題 No.2015 Stair Counter
ユーザー achapiachapi
提出日時 2022-07-22 21:27:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 230 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 107,476 KB
最終ジャッジ日時 2023-09-17 08:48:45
合計ジャッジ時間 5,265 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,044 KB
testcase_01 AC 166 ms
78,076 KB
testcase_02 AC 187 ms
79,040 KB
testcase_03 AC 194 ms
79,248 KB
testcase_04 AC 160 ms
78,052 KB
testcase_05 AC 140 ms
78,100 KB
testcase_06 AC 220 ms
80,056 KB
testcase_07 AC 221 ms
80,384 KB
testcase_08 AC 230 ms
80,184 KB
testcase_09 AC 92 ms
76,948 KB
testcase_10 AC 92 ms
77,036 KB
testcase_11 AC 96 ms
76,940 KB
testcase_12 AC 89 ms
77,456 KB
testcase_13 AC 91 ms
78,584 KB
testcase_14 AC 91 ms
78,940 KB
testcase_15 AC 98 ms
94,528 KB
testcase_16 AC 110 ms
104,004 KB
testcase_17 AC 100 ms
97,940 KB
testcase_18 AC 104 ms
98,096 KB
testcase_19 AC 116 ms
107,476 KB
testcase_20 AC 108 ms
104,296 KB
testcase_21 AC 152 ms
77,840 KB
testcase_22 AC 181 ms
78,596 KB
testcase_23 AC 204 ms
78,956 KB
testcase_24 AC 170 ms
78,164 KB
testcase_25 AC 170 ms
77,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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