結果
問題 | No.2015 Stair Counter |
ユーザー |
|
提出日時 | 2022-07-22 22:34:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 572 bytes |
コンパイル時間 | 707 ms |
コンパイル使用メモリ | 86,128 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-04 07:06:07 |
合計ジャッジ時間 | 2,779 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> #include <map> #include <cmath> using namespace std; int main() { int cas;cin>>cas; while(cas--){ int n; long long m; cin >> n >> m; vector<long long> a(n); for(int i=0;i<n;i++) cin >> a[i]; bool flag = true; for(int i = 0;i<n-1;i++){ if(a[i]+a[i+1]<m) { flag = false; break; } } cout << ((flag)? "Yes" : "No") << endl; } }