#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int M = 1e5 + 10;
const int INF = 2147483647;
const long long mod = 1e9 + 7;
int T, n, m;
int pre[N], a[N];
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
long long qpow(long long base, long long x) {
  long long res = 1;
  while (x) {
    if (x & 1) res = (res * base) % mod;
    base = (base * base) % mod;
    x >>= 1;
  }
  return res;
}
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int suma = 0, sumb = 0, lasta = 0, lastb = 0;
  int l = 1, r = n, cnt = 0;
  while (l <= r) {
    int sum = 0;
    if (cnt % 2 == 0) {
      while (sum <= lastb && l <= r) sum += a[l++];
      suma += sum;
      lasta = sum;
    } else {
      while (sum <= lasta && l <= r) sum += a[r--];
      sumb += sum;
      lastb = sum;
    }
    cnt++;
  }
  cout << cnt << " " << suma << " " << sumb << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cin >> T;
  while (T--) solve();
  return 0;
}
