結果

問題 No.2015 Stair Counter
ユーザー H3PO4H3PO4
提出日時 2022-07-22 21:25:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 327 bytes
コンパイル時間 1,150 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 106,120 KB
最終ジャッジ日時 2023-09-17 08:45:16
合計ジャッジ時間 4,623 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,076 KB
testcase_01 AC 122 ms
77,072 KB
testcase_02 AC 124 ms
77,636 KB
testcase_03 AC 125 ms
77,944 KB
testcase_04 AC 120 ms
77,348 KB
testcase_05 AC 110 ms
78,016 KB
testcase_06 AC 128 ms
77,688 KB
testcase_07 AC 128 ms
77,168 KB
testcase_08 AC 131 ms
77,432 KB
testcase_09 AC 86 ms
76,312 KB
testcase_10 AC 85 ms
76,260 KB
testcase_11 AC 86 ms
76,680 KB
testcase_12 AC 87 ms
77,212 KB
testcase_13 AC 85 ms
78,328 KB
testcase_14 AC 87 ms
77,712 KB
testcase_15 AC 97 ms
93,700 KB
testcase_16 AC 109 ms
102,556 KB
testcase_17 AC 102 ms
98,372 KB
testcase_18 AC 102 ms
96,428 KB
testcase_19 AC 114 ms
106,120 KB
testcase_20 AC 111 ms
104,924 KB
testcase_21 AC 110 ms
77,316 KB
testcase_22 AC 120 ms
77,684 KB
testcase_23 AC 126 ms
77,428 KB
testcase_24 AC 120 ms
77,512 KB
testcase_25 AC 113 ms
77,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.buffer.readline

def solve(N, M, A):
    for i in range(N - 1):
        if A[i] + A[i + 1] < M:
            return False
    return True


T = int(input())
for _ in range(T):
    N, M = map(int, input().split())
    A = tuple(map(int, input().split()))
    print("Yes" if solve(N, M, A) else "No")
0