#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n;
    cin >> n;
    vector<int> cand(n, 0);
    for (int i = 0; i < n; ++i) {
      cin >> cand[i];
    }
    int left = 0, right = n - 1, leftsum = 0, rightsum = 0, lefts = 0,
        rights = 0, lasts = 0;
    int k = 1;
    while (left <= right) {
      if (k % 2) {
        while (left <= right && lefts <= lasts) {
          lefts += cand[left];
          ++left;
        }
        lasts = lefts;
        leftsum += lefts;
        lefts = 0;
      } else {
        while (left <= right && rights <= lasts) {
          rights += cand[right];
          --right;
        }
        lasts = rights;
        rightsum += rights;
        rights = 0;
      }
      ++k;
    }
    cout << k - 1 << ' ' << leftsum << ' ' << rightsum << endl;
  }
  return 0;
}
