結果
| 問題 | No.2922 Rose Garden | 
| コンテスト | |
| ユーザー |  a01sa01to | 
| 提出日時 | 2024-10-16 00:01:07 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 80 ms / 3,000 ms | 
| コード長 | 642 bytes | 
| コンパイル時間 | 3,475 ms | 
| コンパイル使用メモリ | 246,352 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-16 00:01:17 | 
| 合計ジャッジ時間 | 9,415 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 50 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
#else
  #define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
  int n, s, b;
  cin >> n >> s >> b;
  const int inits = s;
  vector<int> a(n);
  rep(i, n) cin >> a[i];
  int now = 0;
  rep(i, n) {
    if (i == n - 1) {
      cout << "Yes" << endl;
      break;
    }
    if (a[i + 1] >= now) {
      if (s < (a[i + 1] - now + b - 1) / b) {
        cout << "No" << endl;
        break;
      }
      s = inits;
      now = a[i + 1];
    }
  }
  return 0;
}
            
            
            
        