#include <bits/stdc++.h>
using namespace std;
const long long int MAX = 10000000;
const long long int mod = 998244353;
long long int power(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long int t = power(a, b / 2, m);
  t = (t * t) % m;
  if (b & 1) t = (t * a) % m;
  return t;
}
long long int modInverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
long long int gcd(long long int a, long long int b) {
  if (!a) return b;
  return gcd(b % a, a);
}
bool prime[MAX];
void sieve() {
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = false;
  for (long long int p = 2; p * p <= MAX; p++) {
    if (prime[p] == true) {
      for (long long int i = p * 2; i <= MAX; i += p) prime[i] = false;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    ;
    long long int x = a[0], y = 0;
    long long int low = 1, high = n - 1, sum = 0, cnt = a[0], moves = 1;
    long long int f = 0;
    while (low <= high) {
      if (f == 0) {
        sum += a[high];
        y += a[high];
        high--;
      }
      if (sum > cnt) {
        if (high >= low) moves++;
        cnt = sum;
        sum = 0;
        f = 1;
      }
      if (high < low) {
        moves++;
        break;
      }
      if (f == 1) {
        sum += a[low];
        x += a[low];
        low++;
      }
      if (sum > cnt) {
        cnt = sum;
        sum = 0;
        if (low <= high) moves++;
        f = 0;
      }
      if (low > high) {
        moves++;
        break;
      }
    }
    cout << moves << " " << x << " " << y << "\n";
  }
  return 0;
}
