#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, l, r, s, p, q, pi, qi;
  cin >> n;
  vector<long long> a(n);
  for (auto& i : a) cin >> i;
  for (l = p = s = q = pi = qi = 0, r = n - 1; l <= r; s++) {
    if (s & 1) {
      for (qi = 0; l <= r && qi <= pi; r--) qi += a[r];
      q += qi;
    } else {
      for (pi = 0; l <= r && pi <= qi; l++) pi += a[l];
      p += pi;
    }
  }
  cout << s << ' ' << p << ' ' << q << '\n';
}
signed main() {
  ios::sync_with_stdio(0), cin.tie(0);
  long long t;
  for (cin >> t; t--;) solve();
  return 0;
}
