#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fastio();
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    for (long long int i = 0; i < n; i++) cin >> arr[i];
    long long int prev = 0;
    long long int alice = 0, bob = 0;
    long long int ia = 0, ib = n, moves = 0;
    while (ia < ib) {
      long long int ca = 0;
      while (ca <= prev && ia < ib) {
        ca += arr[ia];
        ia++;
      }
      moves++;
      alice += ca;
      if (ca <= prev) break;
      prev = ca;
      long long int cb = 0;
      while (cb <= prev && ia < ib) {
        cb += arr[ib - 1];
        ib--;
      }
      if (cb > 0) {
        moves++;
        bob += cb;
      }
      if (cb <= prev) break;
      prev = cb;
    }
    cout << moves << " " << alice << " " << bob;
    cout << "\n";
  }
  return 0;
}
