結果

問題 No.2015 Stair Counter
コンテスト
ユーザー H3PO4
提出日時 2022-07-22 21:25:14
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 67 ms / 2,000 ms
+ 560µs
コード長 327 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 80 ms
コンパイル使用メモリ 64,684 KB
実行使用メモリ 84,360 KB
最終ジャッジ日時 2026-10-16 01:22:20
合計ジャッジ時間 3,445 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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