#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 922337203685477;
const long long mininf = -922337203685477;
const long long nax = 1005;
long long t, n, a[nax];
void solve() {
  cin >> n;
  long long cnt = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long l = 1;
  long long r = n;
  long long save = 0, alice = 0, bob = 0;
  while (1) {
    if (cnt % 2 == 0) {
      cnt++;
      long long sum = 0;
      while (sum <= save) {
        if (l > r) {
          cout << cnt << " " << alice << " " << bob << '\n';
          return;
        }
        sum += a[l];
        alice += a[l];
        l++;
      }
      if (l > r) {
        cout << cnt << " " << alice << " " << bob << '\n';
        return;
      }
      save = sum;
    } else if (cnt % 2 == 1) {
      cnt++;
      long long sum = 0;
      while (sum <= save) {
        if (r < l) {
          cout << cnt << " " << alice << " " << bob << '\n';
          return;
        }
        sum += a[r];
        bob += a[r];
        r--;
      }
      if (r < l) {
        cout << cnt << " " << alice << " " << bob << '\n';
        return;
      }
      save = sum;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> t;
  while (t--) {
    solve();
  }
}
