#include <bits/stdc++.h>
using namespace std;
int isprime(long long p) {
  for (long long i = p / 2; i >= 2; i--) {
    if (p % i == 0) return i;
  }
  return 1;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1, i = 0, j = 0;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (i = 0; i < n; i++) cin >> a[i];
    ;
    long long a1 = 0, b1 = 0, a2 = 0, b = 0, step = 0;
    i = 0, j = n - 1;
    while (i <= j) {
      while (i <= j && a1 <= b1) {
        a1 += a[i];
        i++;
      }
      a2 += a1;
      b1 = 0;
      if (a1 != 0) step++;
      while (i <= j && b1 <= a1) {
        b1 += a[j];
        j--;
      }
      b += b1;
      a1 = 0;
      if (b1 != 0) step++;
    }
    cout << step << " " << a2 << " " << b;
    cout << endl;
  }
}
