func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, i, j, t;     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> t;     while (t--) {       int b, k;       cin >> n >> b >> k;       int arr[n];       for (i = 0; i < n; i++) cin >> arr[i];       int flag = 1;       for (i = 0; i < n - 1; i++) {         if (arr[i] >= arr[i + 1]) {           b += arr[i] - arr[i + 1] + min(k, arr[i + 1]);         } else if (arr[i + 1] > arr[i] + k) {           b -= arr[i + 1] - arr[i] - k;           if (b < 0) {             flag = 0;             break;           }         } else {           b += min(arr[i], arr[i] + k - arr[i + 1]);         }       }       if (flag)         cout <<  YES n ;       else         cout <<  NO n ;     }     return 0;   }   