結果

問題 No.2015 Stair Counter
ユーザー ああいいああいい
提出日時 2022-07-24 07:50:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 862 ms
コンパイル使用メモリ 86,860 KB
実行使用メモリ 107,032 KB
最終ジャッジ日時 2023-09-20 03:05:52
合計ジャッジ時間 6,830 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,284 KB
testcase_01 AC 186 ms
78,568 KB
testcase_02 AC 174 ms
78,232 KB
testcase_03 AC 180 ms
78,600 KB
testcase_04 AC 165 ms
78,280 KB
testcase_05 AC 165 ms
79,688 KB
testcase_06 AC 184 ms
78,064 KB
testcase_07 AC 184 ms
78,532 KB
testcase_08 AC 183 ms
78,380 KB
testcase_09 AC 92 ms
76,388 KB
testcase_10 AC 92 ms
76,500 KB
testcase_11 AC 94 ms
76,648 KB
testcase_12 AC 90 ms
77,132 KB
testcase_13 AC 90 ms
77,908 KB
testcase_14 AC 93 ms
77,916 KB
testcase_15 AC 103 ms
94,124 KB
testcase_16 AC 112 ms
103,876 KB
testcase_17 AC 103 ms
97,708 KB
testcase_18 AC 104 ms
97,584 KB
testcase_19 AC 114 ms
107,032 KB
testcase_20 AC 107 ms
104,176 KB
testcase_21 AC 165 ms
78,496 KB
testcase_22 AC 175 ms
78,208 KB
testcase_23 AC 182 ms
78,900 KB
testcase_24 AC 167 ms
78,560 KB
testcase_25 AC 167 ms
78,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

def calc(N,M,A):
    stop = M
    over = 0
    for a in A:
        if a > M:
            return 'No'
        
        if over <= a:
            pass
        else:
            return 'No'
        stop = a
        over = M - a
    return 'Yes'

for _ in range(T):
    N,M = map(int,input().split())
    A = list(map(int,input().split()))
    print(calc(N,M,A))
0