#include <bits/stdc++.h>
using namespace std;
void solve() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    deque<int> d;
    for (int i = 0; i < n; i++) {
      int e;
      cin >> e;
      d.push_back(e);
    }
    int turns = 0, totalAlice = 0, totalBob = 0, alice = 0, bob = 0;
    bool f;
    while (!d.empty()) {
      alice = 0;
      f = false;
      while (!d.empty() && alice <= bob) {
        alice += d.front();
        d.pop_front();
        f = true;
      }
      totalAlice += alice;
      if (f) turns++;
      bob = 0;
      f = false;
      while (!d.empty() && bob <= alice) {
        bob += d.back();
        d.pop_back();
        f = true;
      }
      totalBob += bob;
      if (f) turns++;
    }
    cout << turns << " " << totalAlice << " " << totalBob << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
