func_code_string: #include <bits/stdc++.h>   using namespace std;   void input(long long ara[], long long n) {     for (long long i = 0; i < n; i++) cin >> ara[i];   }   void output(long long ara[], long long n) {     for (long long i = 0; i < n; i++) cout << ara[i] <<    ;   }   long long mx1(long long ara[], long long n) {     long long mx = -1;     for (long long i = 0; i < n; i++)       if (ara[i] > mx) mx = ara[i];     return mx;   }   long long mn1(long long ara[], long long n) {     long long mn = 1e18;     for (long long i = 1; i <= n; i++)       if (ara[i] < mn) mn = ara[i];     return mn;   }   int maxSubArraySum(long long a[], long long size) {     long long max_so_far = INT_MIN, max_ending_here = 0;     for (long long i = 0; i < size; i++) {       max_ending_here = max_ending_here + a[i];       if (max_so_far < max_ending_here) max_so_far = max_ending_here;       if (max_ending_here < 0) max_ending_here = 0;     }     return max_so_far;   }   int main() {     (ios_base::sync_with_stdio(false), cin.tie(NULL));     long long t;     cin >> t;     while (t--) {       long long n;       cin >> n;       long long ara[n + 1];       input(ara, n);       long long k = 0, sum = 0;       for (long long i = 0; i < n; i++) {         sum += ara[i];         if (sum <= 0) {           k = 1;         }       }       sum = 0;       for (long long i = n - 1; i >= 0; i--) {         sum += ara[i];         if (sum <= 0) {           k = 1;           break;         }       }       if (k == 1)         cout <<  NO  << endl;       else         cout <<  YES  << endl;     }   }   