#include <bits/stdc++.h>
using namespace std;
void slv() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int &x : a) cin >> x;
  int start = 0, last = N - 1, ans = 0, p = 1;
  ;
  int64_t alice = 0, bob = 0, cural = 0, curbob = 0;
  while (start <= last) {
    ans++;
    if (p == 1) {
      cural = 0;
      while (cural <= curbob && start <= last) {
        cural += a[start];
        alice += a[start];
        start++;
      }
      if (cural <= curbob) break;
      p++;
    } else {
      curbob = 0;
      while (curbob <= cural && start <= last) {
        curbob += a[last];
        bob += a[last];
        last--;
      }
      if (cural >= curbob) break;
      p = 1;
    }
  }
  cout << ans << ' ' << alice << ' ' << bob << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) slv();
  return 0;
}
