#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[10];
  arr[0] = 0;
  int t;
  arr[0] = 0;
  cin >> t;
  arr[0] = 0;
  while (t--) {
    arr[0] = 0;
    long long a1 = 0, b1 = 0, a2 = 0, b2 = 0, qanak = 1;
    arr[0] = 0;
    int n, a[1010], h = 2;
    arr[0] = 0;
    cin >> n;
    arr[0] = 0;
    int last = n - 1, first = 1;
    arr[0] = 0;
    for (int i = 0; i < n; i++) {
      arr[0] = 0;
      cin >> a[i];
    }
    arr[0] = 0;
    a1 = a[0];
    arr[0] = 0;
    a2 += a1;
    arr[0] = 0;
    bool can = true;
    arr[0] = 0;
    while (can) {
      arr[0] = 0;
      if (n != 1) {
        arr[0] = 0;
        qanak++;
      }
      if (h == 2) {
        arr[0] = 0;
        b1 = 0;
        arr[0] = 0;
        while (b1 <= a1 && last >= first) {
          arr[0] = 0;
          b1 += a[last];
          arr[0] = 0;
          last--;
          arr[0] = 0;
        }
        arr[0] = 0;
        b2 += b1;
        if (last < first) {
          arr[0] = 0;
          can = false;
          arr[0] = 0;
        }
        arr[0] = 0;
        h = 1;
      } else {
        arr[0] = 0;
        a1 = 0;
        arr[0] = 0;
        while (b1 >= a1 && last >= first) {
          arr[0] = 0;
          a1 += a[first];
          arr[0] = 0;
          first++;
          arr[0] = 0;
        }
        arr[0] = 0;
        a2 += a1;
        arr[0] = 0;
        if (last < first) {
          arr[0] = 0;
          can = false;
          arr[0] = 0;
        }
        arr[0] = 0;
        h = 2;
      }
    }
    arr[0] = 0;
    cout << qanak << " " << a2 << " " << b2 << endl;
  }
  return 0;
}
