結果

問題 No.2015 Stair Counter
ユーザー siganai
提出日時 2022-07-22 21:25:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 101,284 KB
最終ジャッジ日時 2024-07-04 05:21:31
合計ジャッジ時間 3,609 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env PyPy3

from collections import Counter, defaultdict, deque
import itertools
import re
import math
from functools import reduce
import operator
import bisect
from heapq import *
import functools
mod=998244353

import sys
input=sys.stdin.readline

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')
        continue
    for i in range(1,n-1):
        if a[i] + a[i-1] < m:
            print('No')
            break
    else:
        print('Yes')
0