#include <bits/stdc++.h>
int main() {
  long t;
  scanf("%ld", &t);
  while (t--) {
    long m;
    scanf("%ld", &m);
    std::vector<long> ar(m);
    for (long i = 0; i < m; i++) {
      scanf("%ld", &ar[i]);
    }
    long c(0), a(0), b(0);
    long x(0), y(m - 1);
    long cu(0), p(0);
    while (x <= y) {
      while ((x <= y) && (cu <= p)) {
        cu += ar[x];
        a += ar[x];
        ++x;
      }
      p = cu;
      c += (cu > 0);
      cu = 0;
      while ((x <= y) && (cu <= p)) {
        cu += ar[y];
        b += ar[y];
        --y;
      }
      p = cu;
      c += (cu > 0);
      cu = 0;
    }
    printf("%ld %ld %ld\n", c, a, b);
  }
  return 0;
}
