#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    deque<int> dq(n);
    for (int &x : dq) cin >> x;
    int alice = 0, bob = 0, start = 0, moves = 0;
    bool sw = 1;
    while (!dq.empty()) {
      if (sw) {
        int ans = 0;
        while (!dq.empty() && ans <= start) ans += dq.front(), dq.pop_front();
        alice += ans;
        start = ans;
        sw = 0;
      } else {
        int ans = 0;
        while (!dq.empty() && ans <= start) ans += dq.back(), dq.pop_back();
        bob += ans;
        start = ans;
        sw = 1;
      }
      moves++;
    }
    cout << moves << " " << alice << " " << bob << "\n";
  }
}
