#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, a = 0, b = 0, m = 0, c = 0, it, t;
  bool bb = 1;
  cin >> n;
  vector<int> v(n);
  for (auto &i : v) cin >> i;
  while (1) {
    if (v.size() == 0) break;
    m++;
    if (bb) {
      it = 0;
      t = 0;
      while (it < v.size() && t <= c) {
        t += v[it];
        it++;
      }
      a += t;
      c = t;
      v.erase(v.begin(), v.begin() + it);
    } else {
      it = v.size() - 1;
      t = 0;
      while (it >= 0 && t <= c) {
        t += v[it];
        it--;
      }
      it++;
      b += t;
      c = t;
      v.erase(v.begin() + it, v.end());
    }
    bb = 1 - bb;
  }
  cout << m << ' ' << a << ' ' << b << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
