#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int i, arr[n];
    for (i = 0; i < n; i++) cin >> arr[i];
    int ap{0}, bp{n}, asize{arr[0]}, bsize{}, moves{1}, left = n - 1;
    bool a = 1;
    while (left != 0) {
      if (a) {
        while (bsize <= asize && left != 0) {
          bsize += arr[bp - 1];
          bp--;
          left--;
        }
        moves++;
        asize = 0;
        a = 0;
      } else {
        while (asize <= bsize && left != 0) {
          asize += arr[ap + 1];
          ap++;
          left--;
        }
        moves++;
        bsize = 0;
        a = 1;
      }
    }
    cout << moves << " ";
    asize = 0;
    for (i = 0; i <= ap; i++) asize += arr[i];
    cout << asize << " ";
    bsize = 0;
    for (; i < n; i++) bsize += arr[i];
    cout << bsize << endl;
  }
}
