#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long INF = 1e12;
const long long N = 100005;
void solve() {
  long long n;
  cin >> n;
  long long A[n];
  for (long long i = 0; i < n; i++) cin >> A[i];
  long long i = 0, j = n - 1;
  long long cnt = 0, a = 0, b = 0;
  bool f = 0;
  long long p = 0, q = 0;
  while (j >= i) {
    cnt++;
    if (!f) {
      while (j >= i) {
        p += A[i];
        a += A[i];
        i++;
        if (p > q) {
          q = 0;
          break;
        }
      }
    } else {
      while (j >= i) {
        b += A[j];
        q += A[j];
        j--;
        if (q > p) {
          p = 0;
          break;
        }
      }
    }
    f = f ^ 1;
  }
  cout << cnt << " " << a << " " << b << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long no;
  cin >> no;
  while (no--) {
    solve();
  }
  return 0;
}
