/// 欲戴皇冠,必承其重。
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
typedef unsigned long long ull;
#define x first
#define y second
#define PI acos(-1)
#define inf 0x3f3f3f3f
#define lowbit(x) ((-x)&x)
#define debug(x) cout << #x <<": " << x << endl;
const int MOD = 998244353;
const int mod = 998244353;
const int N = 1e5 + 10;
const int dx[] = {0, 1, -1, 0, 0, 0, 0};
const int dy[] = {0, 0, 0, 1, -1, 0, 0};
const int dz[] = {0, 0, 0, 0, 0, 1, -1};
int day[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
ll n, m,p;
ll a[N],b[N];
ll dp[N][500];
void solve()
{
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
b[i]=b[i-1]+a[i];
}
for(int i=1;i*i<=((n+1)*2);i++) dp[n+1][i]=-1e16;
dp[n+1][0]=1e16;
for(int i=n;i>=1;i--){
for(int j=0;j*j<=((n+1)*2);j++){
dp[i][j]=dp[i+1][j];
if(j&&i+j-1<=n&&b[j+i-1]-b[i-1]<dp[i+j][j-1]) dp[i][j]=max(dp[i][j],b[i+j-1]-b[i-1]);
}
}
for(int i=sqrt((n+1)*2);;i--){
if(dp[1][i]>0) {
cout<<i<<endl;
return ;
}
}
}
int main()
{
ll t = 1;
scanf("%lld", &t);
while(t--)
{
solve();
}
return 0;
}