#include #include // For abs() using namespace std; int main() { int n, s, b; cin >> n >> s >> b; int H[n]; for (int i = 0; i < n; i++) { cin >> H[i]; } // Initialize the first height difference for comparison int prev_hd = abs(H[1] - H[0]); for (int i = 1; i < n; i++) { int hd = H[i] - H[i-1]; // Current height difference (can be negative) // If current and previous height differences are the same, no stamina is consumed if (abs(hd) == prev_hd) { continue; } if (hd > 0) { // If height difference is positive (jumping upward) if (hd > b) { // Calculate how many stamina points are needed to cover the jump int jumps = (hd + b - 1) / b; // Equivalent to ceil(hd / b) s -= jumps; // Deduct stamina for the required jumps } else { // Single jump if hd <= b s--; // One stamina consumed } } // If stamina becomes insufficient, print No and exit if (s < 0) { cout << "No"; return 0; } // Update the previous height difference for the next iteration prev_hd = abs(hd); } // If all scaffolds are traversed successfully, print Yes cout << "Yes"; return 0; }