#include <bits/stdc++.h>
using namespace std;
const long long int N = 200010;
const long long int MOD = 998244353;
long long int mod(long long int n) { return (n % MOD + MOD) % MOD; }
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  long long int bob = 0, alice = 0, prev_bob = 0, prev_alice = 0, sum1 = 0,
                sum2 = 0, curr1 = 0, curr2 = 0;
  long long int i = 0, j = n - 1, f = 1, count = 0;
  sum1 = a[0];
  prev_alice = a[0];
  count = 1;
  i = 1;
  while (i <= j) {
    if (f == 0) {
      while (alice <= prev_bob && i <= j) {
        alice += a[i];
        i++;
      }
      count++;
      prev_alice = alice;
      sum1 += alice;
      alice = 0;
      f = 1;
    } else {
      while (bob <= prev_alice && i <= j) {
        bob += a[j];
        j--;
      }
      count++;
      prev_bob = bob;
      sum2 += bob;
      bob = 0;
      f = 0;
    }
  }
  cout << count << " " << sum1 << " " << sum2 << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  cin >> T;
  for (long long int i = 0; i < T; i++) solve();
}
