結果
| 問題 | No.2015 Stair Counter |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-23 07:17:59 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 1,197 ms |
| コンパイル使用メモリ | 212,684 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-26 18:54:25 |
| 合計ジャッジ時間 | 2,822 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int t, n;
long long m;
int main()
{
cin >> t;
for (int i = 0; i < t; i++) {
cin >> n >> m;
vector<long long> a(n);
bool f = 0;
for (int j = 0; j < n; j++) {
cin >> a[j];
if (j > 0 && a[j - 1] + a[j] < m)
f = 1;
}
if(f)
cout << "No" << endl;
else
cout << "Yes" << endl;
}
}