#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000000 + 7;
long long int mul(long long int a, long long int b) {
  return ((a % mod) * (b % mod)) % mod;
}
long long int add(long long int a, long long int b) {
  return ((a % mod) + (b % mod)) % mod;
}
void solve() {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int a = 0, b = 0;
  int move = 0;
  int i = 0, j = n;
  int prev_a = A[0];
  a += A[0];
  move++;
  int prev_b = 0;
  bool flag = false;
  while (j - 1 > i) {
    move++;
    if (flag) {
      while (prev_a <= prev_b && j - 1 > i) {
        i++;
        flag = false;
        prev_a += A[i];
        a += A[i];
      }
      prev_b = 0;
    } else {
      while (prev_b <= prev_a && j - 1 > i) {
        j--;
        flag = true;
        prev_b += A[j];
        b += A[j];
      }
      prev_a = 0;
    }
  }
  cout << move << " " << a << " " << b << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
