#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
const int mod = 1e9 + 7;
int f[N], h[N], sum[N], down[N];
void init() {
  for (int i = 0; i < N; i++) f[i] = i, h[i] = 0, sum[i] = 1, down[i] = 0;
}
int find(int x) { return x == f[x] ? x : f[x] = find(f[x]); }
void join(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  if (h[x] == h[y]) {
    f[x] = y;
    h[y]++;
  } else {
    if (h[x] > h[y])
      f[y] = x;
    else
      f[x] = y;
  }
}
void out(int* a, int n) {
  for (int i = 1; i <= n; ++i) cout << a[i];
  cout << endl;
}
bool same(int x, int y) { return find(x) == find(y); }
int a[N];
void solve() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int l = 0, r = n - 1;
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    bool f = 1;
    int ago = 0;
    int sa = 0, sb = 0, res = 0;
    while (l <= r) {
      res++;
      if (f) {
        int sum = 0;
        while (sum <= ago) {
          if (l > r) break;
          sum += a[l++];
        }
        ago = sum;
        sa += sum;
        f = 0;
      } else {
        int sum = 0;
        while (sum <= ago) {
          if (l > r) break;
          sum += a[r--];
        }
        ago = sum;
        sb += sum;
        f = 1;
      }
    }
    printf("%d %d %d\n", res, sa, sb);
  }
}
int main() {
  solve();
  return 0;
}
