#include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define length size() #define __STDCPP_FLOAT128_T__ #define Real1024 float128_t #define int long long #define ll long long #define ALL(v) (v).begin(), (v).end() constexpr ll inf = 1001001001001001001ll; constexpr ll mod = /* 1000000007*/ 998244353; constexpr double pi = 3.141592653589793; //小数出力 //cout << setprecision(12); //max template< typename T1, typename T2 > inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } //min template< typename T1, typename T2 > inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); } //print void print() { cout << '\n'; } template void print(const T &t) { cout << t << '\n'; } template void print(const Head &head, const Tail &... tail) { cout << head << ' '; print(tail...); } //join template string join(vector &vec ,const string &sp){ int si = vec.length; if(si==0){ return ""; }else{ stringstream ss; rep(i,si-1){ ss << vec[i] << sp; } ss << vec[si - 1]; return ss.str(); } } bool in_range(int l,int x,int r){//閉区間 return (l <= x ) && (x <= r); } int div_ceil(int x,int y){ return (x+y-1)/y; } int blood(char x,char y){ if(x == 'O' && y == 'O') return 3; if((x == 'A' && y == 'B') || (x == 'B' && y == 'A')) return 2; if(x == 'A' || y == 'A') return 0; return 1; } //Template End vector> p_fact(int N) { vector> res; for (int a = 2; a * a <= N; ++a) { if (N % a != 0) continue; int ex = 0; // 指数 // 割れる限り割り続ける while (N % a == 0) { ++ex; N /= a; } // その結果を push res.push_back({a, ex}); } // 最後に残った数について if (N != 1) res.push_back({N, 1}); return res; } void one(){ cout << 2 << endl; cout << 1 << " " << 2 << endl; cout << "b g" << endl; } signed main(void){ int n,s,b; cin >> n >> s >> b; vector vec(s+1,-1); vector nvec(s+1,-1); cin >> vec[s]; int lh = vec[s]; for(int i=1;i> h; bool f = false; rep(i,s+1){ if(lh >= h){ nvec[i] = vec[i]; f = true; }else{ int t = div_ceil(h-lh,b); if(i>=t){ nvec[i-t] = vec[i]+b*t; f = true; } } } if(f) nvec[s] = h; else{ cout << "No" << endl; return 0; } lh = h; rep(i,s+1) vec[i] = nvec[i]; rep(i,s+1) nvec[i] = -1; } cout << "Yes" << endl; }