#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n, p = 0, q = 0, m = 0;
    cin >> n;
    int A[n];
    int i, j, last, last1 = 0;
    for (i = 0; i < n; i++) cin >> A[i];
    i = 1, j = n - 1;
    m = 1;
    p = A[0];
    last = p;
    while (j >= i) {
      if (m % 2 != 0) {
        last1 = 0;
        while (last1 <= last && j >= i) {
          last1 += A[j];
          q += A[j];
          j--;
        }
        m++;
      } else {
        last = 0;
        while (last <= last1 && i <= j) {
          last += A[i];
          p += A[i];
          i++;
        }
        m++;
      }
    }
    cout << m << " " << p << " " << q << endl;
  }
  return 0;
}
