#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
template <typename... t>
void read(t&... args) {
  ((cin >> args), ...);
}
template <typename... t>
void write(t... args) {
  ((cout << args << ' '), ...);
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long p = power(a, b / 2) % 1000000007;
  p = (p * p) % 1000000007;
  if (b & 1) p = (p * a) % 1000000007;
  return p;
}
void testcase() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  long long a = 0, b = 0, m = 0, p = 0, q = 0;
  long long i = 0, j = n - 1, ch = 1;
  while (i <= j) {
    long long temp = 0;
    if (ch == 1) {
      while (temp <= q and i <= j) {
        temp += v[i];
        i++;
      }
      a += temp;
      p = temp;
      ch = 2;
    } else if (ch == 2) {
      while (temp <= p and j >= i) {
        temp += v[j];
        j--;
      }
      b += temp;
      q = temp;
      ch = 1;
    }
    m++;
  }
  cout << m << ' ' << a << ' ' << b;
}
signed main() {
  ios::sync_with_stdio(false), cin.tie(NULL);
  long long t = 1;
  cin >> t;
  for (long long i = 1; i <= t; i++) {
    testcase();
    cout << '\n';
  }
  return 0;
}
