description: Pchelyonok decided to give Mila a gift. Pchelenok has already bought an array a of length n, but gifting an array is too common. Instead of that, he decided to gift Mila the segments of that array!
  
  Pchelyonok wants his gift to be beautiful, so he decided to choose k non-overlapping segments of the array [l_1,r_1], [l_2,r_2], … [l_k,r_k] such that:
  
    * the length of the first segment [l_1,r_1] is k, the length of the second segment [l_2,r_2] is k-1, …, the length of the k-th segment [l_k,r_k] is 1 
    * for each i<j, the i-th segment occurs in the array earlier than the j-th (i.e. r_i<l_j) 
    * the sums in these segments are strictly increasing (i.e. let sum(l … r) = ∑_{i=l}^{r} a_i — the sum of numbers in the segment [l,r] of the array, then sum(l_1 … r_1) < sum(l_2 … r_2) < … < sum(l_k … r_k)). 
  
  
  
  Pchelenok also wants his gift to be as beautiful as possible, so he asks you to find the maximal value of k such that he can give Mila a gift!
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 100) — the number of test cases. The next 2 ⋅ t lines contain the descriptions of test cases. The description of each test case consists of two lines.
  
  The first line of each test case contains a single integer n (1 ≤ n ≤ 10^5) — the length of the array.
  
  The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^9) — the elements of the array a.
  
  It is guaranteed that the sum of n over all test cases does not exceed 10^5.
  
  Output
  
  For each test case, print the maximum possible value of k.
  
  Example
  
  Input
  
  
  5
  1
  1
  3
  1 2 3
  5
  1 1 2 2 3
  7
  1 2 1 1 3 2 6
  5
  9 6 7 9 7
  
  
  Output
  
  
  1
  1
  2
  3
  1
solution: /*==========================================================================
  *   	AUTHOR:    RonWonWon
  *   	CREATED:   29.10.2021 00:15:55
  /*==========================================================================*/
  import java.io.*;
  import java.util.*;
  
  public class E {
  
  	public static void main(String[] args) throws IOException {
  		/*
      in.ini();
      PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
      */
      long startTime = System.nanoTime();
      int t = in.nextInt(), T = 1;
      while(t-->0) {
  			int n = in.nextInt(), a[] = in.readArray(n);
  			int k = (int)Math.sqrt(2*n);
  			long dp[][] = new long[k+1][n+1];
  			long prefix[] = new long[n]; prefix[0] = a[0]; for(int i=1;i<n;i++) prefix[i] = prefix[i-1] + a[i];
  			for(int i=1;i<=n;i++) dp[1][i] = a[i-1];
  			for(int i=n-1;i>0;i--){
  				for(int j=1;j<=k;j++){
  					dp[j][i] = Math.max(dp[j][i+1],dp[j][i]);
  					if(j==1) continue;
  					if(i+j<=n){
  						long s = prefix[i+j-2];
  						if(i-2>-1) s -= prefix[i-2];
  						if(dp[j-1][i+j]>s){
  							dp[j][i] = Math.max(dp[j][i],s);
  						}
  					}
  				}
  			}
  			int mx = 0;
  			for(int i=1;i<=k;i++){
  				for(int j=1;j<=n;j++){
  					if(dp[i][j]!=0) mx = i;
  				}
  			}
  			out.println(mx);
     		//out.println("Case #"+T+": "+ans); T++;
      }
      /*
      startTime = System.nanoTime() - startTime;
      System.err.println("Time: "+(startTime/1000000));
      */
      out.flush();
  	}
  
  	static FastScanner in = new FastScanner();
    static PrintWriter out = new PrintWriter(System.out);
  	static int oo = Integer.MAX_VALUE;
  	static long ooo = Long.MAX_VALUE;
  
  	static class FastScanner {
  		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  		StringTokenizer st = new StringTokenizer("");
  
  		void ini() throws FileNotFoundException {
  			br = new BufferedReader(new FileReader("input.txt"));
  		}
  
  		String next() {
  			while(!st.hasMoreTokens())
  				try { st = new StringTokenizer(br.readLine()); }
  				catch(IOException e) {}
  			return st.nextToken();
  		}
  
  		String nextLine(){
  			try{ return br.readLine(); }
  			catch(IOException e) { } return "";
  		}
  
  		int nextInt() {
  			return Integer.parseInt(next());
  		}
  
  		int[] readArray(int n) {
  			int a[] = new int[n];
  			for(int i=0;i<n;i++) a[i] = nextInt();
  			return a;
  		}
  
  		long nextLong() {
  			return Long.parseLong(next());
  		}
  
  		long[] readArrayL(int n) {
  			long a[] = new long[n];
  			for(int i=0;i<n;i++) a[i] = nextLong();
  			return a;
  		}
  
  		double nextDouble() {
  			return Double.parseDouble(next());
  		}
  
  		double[] readArrayD(int n) {
  			double a[] = new double[n];
  			for(int i=0;i<n;i++) a[i] = nextDouble();
  			return a;
  		}
  	}
  
  	static final Random random = new Random();
  
  	static void ruffleSort(int[] a){
  		int n = a.length;
  		for(int i=0;i<n;i++){
  			int j = random.nextInt(n), temp = a[j];
  			a[j] = a[i]; a[i] = temp;
  		}
  		Arrays.sort(a);
  	}
  
  	static void ruffleSortL(long[] a){
  		int n = a.length;
  		for(int i=0;i<n;i++){
  			int j = random.nextInt(n);
  			long temp = a[j];
  			a[j] = a[i]; a[i] = temp;
  		}
  		Arrays.sort(a);
  	}
  }
  