#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <class T>
inline void read(T &res) {
  char c;
  T flag = 1;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') flag = -1;
  res = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') res = res * 10 + c - '0';
  res *= flag;
}
const int N = 1000 + 100;
int t;
int n;
int a[N];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    int l = 0;
    int r = n;
    int f = 0;
    int suma = 0;
    int sumb = 0;
    int c = 0;
    int pre = 0;
    while (l < r) {
      int zhi = 0;
      if (f == 0) {
        while (l < r && zhi <= pre) {
          zhi += a[l++];
        }
        suma += zhi;
        f = 1;
      } else {
        while (l < r && zhi <= pre) {
          zhi += a[--r];
        }
        sumb += zhi;
        f = 0;
      }
      c++;
      pre = zhi;
    }
    printf("%d %d %d\n", c, suma, sumb);
  }
  return 0;
}
