#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
void print(vector<long long> v) {
  long long i;
  for (i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << "\n";
}
void print(set<long long> s) {
  set<long long>::iterator itr = s.begin();
  for (; itr != s.end(); itr++) {
    cout << (*itr) << " ";
  }
  cout << "\n";
}
vector<long long> read(long long n) {
  long long i;
  vector<long long> arr(n, 0);
  for (i = 0; i < n; i++) cin >> arr[i];
  return arr;
}
vector<long long> read(long long n, long long k) {
  long long i;
  vector<long long> arr(n + k, 0);
  for (i = k; i < n + k; i++) cin >> arr[i];
  return arr;
}
bool isEven(long long n) {
  if (n % 2 == 0) return true;
  return false;
}
bool isOdd(long long n) {
  if (n % 2 == 1) return true;
  return false;
}
void solve() {
  long long t;
  cin >> (t);
  while (t--) {
    long long i, j, k, n, m, p, q, x, y;
    cin >> n;
    vector<long long> arr(n);
    arr = read(n);
    long long a = 0, b = 0, preva = 0, prevb = 0, ct = 0;
    i = 0, j = n - 1;
    while (i <= j) {
      if (isEven(ct)) {
        long long stepSum = 0;
        while (stepSum <= prevb && i <= j && i < n) {
          stepSum += arr[i];
          i++;
        }
        preva = stepSum;
        a += preva;
        ct++;
      } else {
        long long stepSum = 0;
        while (stepSum <= preva && i <= j && j >= 0) {
          stepSum += arr[j];
          j--;
        }
        prevb = stepSum;
        b += prevb;
        ct++;
      }
    }
    cout << ct << " " << a << " " << b << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  long long i, j, k, n, m, p, q, x, y;
  return 0;
}
