#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, p, j, u, i, t1, p1;
  scanf("%d", &t1);
  for (p1 = 1; p1 <= t1; p1++) {
    int n, suma = 0, sumb = 0, num = 0;
    int sweet[1009];
    scanf("%d", &n);
    for (i = 1; i <= n; i++) {
      scanf("%d", &sweet[i]);
    }
    t = 0;
    for (i = 1, j = n;;) {
      if (j < i) {
        break;
      }
      u = sweet[i++];
      while (u <= t && i <= j) {
        u += sweet[i++];
      }
      suma += u;
      t = u;
      num++;
      if (j < i) {
        break;
      }
      u = sweet[j--];
      while (u <= t & i <= j) {
        u += sweet[j--];
      }
      sumb += u;
      t = u;
      num++;
    }
    printf("%d %d %d\n", num, suma, sumb);
  }
  return 0;
}
