結果

問題 No.2015 Stair Counter
ユーザー siganaisiganai
提出日時 2022-07-22 21:25:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 207 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 87,008 KB
実行使用メモリ 109,356 KB
最終ジャッジ日時 2023-09-17 08:45:20
合計ジャッジ時間 6,680 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
78,720 KB
testcase_01 AC 186 ms
80,928 KB
testcase_02 AC 196 ms
81,076 KB
testcase_03 AC 198 ms
81,244 KB
testcase_04 AC 184 ms
80,892 KB
testcase_05 AC 179 ms
80,856 KB
testcase_06 AC 207 ms
81,220 KB
testcase_07 AC 205 ms
81,604 KB
testcase_08 AC 205 ms
81,236 KB
testcase_09 AC 162 ms
80,316 KB
testcase_10 AC 159 ms
80,336 KB
testcase_11 AC 160 ms
80,152 KB
testcase_12 AC 157 ms
81,088 KB
testcase_13 AC 161 ms
82,252 KB
testcase_14 AC 161 ms
81,560 KB
testcase_15 AC 170 ms
97,328 KB
testcase_16 AC 181 ms
106,380 KB
testcase_17 AC 167 ms
101,368 KB
testcase_18 AC 173 ms
100,544 KB
testcase_19 AC 182 ms
109,356 KB
testcase_20 AC 174 ms
107,732 KB
testcase_21 AC 178 ms
80,864 KB
testcase_22 AC 192 ms
80,924 KB
testcase_23 AC 199 ms
81,344 KB
testcase_24 AC 188 ms
80,724 KB
testcase_25 AC 188 ms
80,928 KB
権限があれば一括ダウンロードができます

ソースコード

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