結果

問題 No.2015 Stair Counter
ユーザー ShirotsumeShirotsume
提出日時 2022-01-13 17:42:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 183 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 1,614 ms
コンパイル使用メモリ 86,456 KB
実行使用メモリ 106,732 KB
最終ジャッジ日時 2023-08-11 06:22:25
合計ジャッジ時間 8,594 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,244 KB
testcase_01 AC 167 ms
78,308 KB
testcase_02 AC 174 ms
78,824 KB
testcase_03 AC 178 ms
78,760 KB
testcase_04 AC 158 ms
78,428 KB
testcase_05 AC 156 ms
79,364 KB
testcase_06 AC 181 ms
78,644 KB
testcase_07 AC 180 ms
78,176 KB
testcase_08 AC 183 ms
78,436 KB
testcase_09 AC 88 ms
76,420 KB
testcase_10 AC 87 ms
76,392 KB
testcase_11 AC 90 ms
76,200 KB
testcase_12 AC 86 ms
76,824 KB
testcase_13 AC 85 ms
77,596 KB
testcase_14 AC 85 ms
77,652 KB
testcase_15 AC 97 ms
93,988 KB
testcase_16 AC 110 ms
103,500 KB
testcase_17 AC 95 ms
97,520 KB
testcase_18 AC 99 ms
97,548 KB
testcase_19 AC 108 ms
106,732 KB
testcase_20 AC 103 ms
103,796 KB
testcase_21 AC 158 ms
78,216 KB
testcase_22 AC 178 ms
78,768 KB
testcase_23 AC 181 ms
78,336 KB
testcase_24 AC 165 ms
78,172 KB
testcase_25 AC 161 ms
78,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n, m, a):
    ans = 'Yes'
    for i in range(0, n - 1):
        if m - a[i] < 0 or (a[i] + a[i + 1]) - m < 0:
            ans = 'No'
    return ans       
for _ in range(int(input())):
    n, m = map(int,input().split())
    a = list(map(int,input().split()))

    print(solve(n, m, a))
0