結果
問題 |
No.2015 Stair Counter
|
ユーザー |
|
提出日時 | 2022-01-17 10:04:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 72 ms / 2,000 ms |
コード長 | 512 bytes |
コンパイル時間 | 4,079 ms |
コンパイル使用メモリ | 251,120 KB |
最終ジャッジ日時 | 2025-01-27 12:50:35 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; #define all(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < n; i++) int main(void) { ll t; cin >> t; while(t--){ ll n, m; cin >> n >> m; vector<ll> a(n, 0); rep(i, n) cin >> a[i]; string ans = "Yes"; rep(i, n - 1){ if(a[i] + a[i + 1] < m) ans = "No"; } cout << ans << endl; } return 0; }