#include <bits/stdc++.h>
int a[1005];
int main() {
  int t, n, l, r, aa, bb, last, now, cc;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    aa = 0;
    bb = 0;
    l = 0;
    r = n - 1;
    last = 0;
    now = 0;
    cc = 0;
    while (l <= r) {
      while (l <= r && now <= last) {
        now += a[l];
        l++;
      }
      aa += now;
      last = now;
      if (now) cc++;
      now = 0;
      while (l <= r && now <= last) {
        now += a[r];
        r--;
      }
      bb += now;
      last = now;
      if (now) cc++;
      now = 0;
    }
    printf("%d %d %d\n", cc, aa, bb);
  }
  return 0;
}
