#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  int i = 0, tek1 = 0, tek2 = 0, k1 = 0, k2 = 0, r1 = 0, r2 = 0, x = 0, j = 0;
  for (i = 0; i < k; i++) {
    int n;
    cin >> n;
    int* a = (int*)malloc(n * sizeof(int));
    for (j = 0; j < n; j++) cin >> a[j];
    tek1 = a[0];
    tek2 = 0;
    r1 = tek1;
    x = 1;
    k1 = 0;
    k2 = n - 1;
    while (k1 < k2) {
      if (tek1 == 0) {
        while ((tek1 <= tek2) && (k1 < k2)) {
          k1++;
          tek1 += a[k1];
        }
        x++;
        r1 += tek1;
        tek2 = 0;
      } else {
        while ((tek2 <= tek1) && (k1 < k2)) {
          tek2 += a[k2];
          k2--;
        }
        x++;
        r2 += tek2;
        tek1 = 0;
      }
    }
    cout << x << ' ' << r1 << ' ' << r2 << endl;
    x = 0;
    r1 = 0;
    r2 = 0;
  }
  return 0;
}
