結果

問題 No.2015 Stair Counter
ユーザー 👑 H20H20
提出日時 2022-07-22 21:45:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 219 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 86,640 KB
実行使用メモリ 107,012 KB
最終ジャッジ日時 2023-09-17 09:30:32
合計ジャッジ時間 5,969 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,056 KB
testcase_01 AC 181 ms
77,844 KB
testcase_02 AC 189 ms
78,028 KB
testcase_03 AC 204 ms
78,292 KB
testcase_04 AC 154 ms
77,376 KB
testcase_05 AC 140 ms
77,356 KB
testcase_06 AC 211 ms
78,120 KB
testcase_07 AC 219 ms
78,132 KB
testcase_08 AC 210 ms
78,052 KB
testcase_09 AC 91 ms
76,460 KB
testcase_10 AC 92 ms
76,320 KB
testcase_11 AC 95 ms
76,500 KB
testcase_12 AC 89 ms
76,772 KB
testcase_13 AC 90 ms
77,312 KB
testcase_14 AC 90 ms
78,112 KB
testcase_15 AC 102 ms
93,732 KB
testcase_16 AC 111 ms
103,572 KB
testcase_17 AC 101 ms
97,524 KB
testcase_18 AC 104 ms
97,620 KB
testcase_19 AC 115 ms
107,012 KB
testcase_20 AC 110 ms
103,924 KB
testcase_21 AC 165 ms
77,352 KB
testcase_22 AC 143 ms
77,172 KB
testcase_23 AC 204 ms
78,064 KB
testcase_24 AC 172 ms
78,028 KB
testcase_25 AC 169 ms
77,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
    N,M = map(int, input().split())
    A = list(map(int, input().split())) 
    if A[-1]!=M:
        print('No')
    else:
        for i in range(N-1):
            if A[i]+A[i+1]<M or A[i]>M:
                print('No')
                break        
        else:
            print('Yes')
0