#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int M = 1e9 + 7;
const int MOD = 998244353;
const double PI = 3.141592653589793238460;
long long int power(long long int a, long long int b) {
  long long int res = 1;
  if (a == 0) return 0;
  if (a == 1) return 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) res = (res * a);
    if (res > MOD) res %= MOD;
    a = (a * a);
    if (a > MOD) a = a % MOD;
  }
  return res;
}
bool isPrime[1000001];
vector<long long int> prime;
void seive(int limit) {
  isPrime[0] = isPrime[1] = 1;
  for (int i = 2; i * i <= limit; i++) {
    if (!isPrime[i])
      for (int j = i * i; j <= limit; j += i) {
        isPrime[j] = 1;
      }
  }
  for (int i = 2; i <= limit; i++)
    if (!isPrime[i]) prime.push_back(i);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int tt = 1;
  cin >> tt;
  while (tt--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    long long int i = 0, j = n - 1;
    bool flag = 1;
    long long int a = arr[i++], b = 0, pre = a, cnt = 1;
    while (1) {
      if (flag) {
        long long int sum = 0;
        for (; j >= i; j--) {
          sum += arr[j];
          if (sum > pre) {
            j--;
            break;
          }
        }
        b += sum;
        pre = sum;
        if (sum)
          cnt++;
        else
          break;
        flag = 1 - flag;
      } else {
        long long int sum = 0;
        for (; i <= j; i++) {
          sum += arr[i];
          if (sum > pre) {
            i++;
            break;
          }
        }
        a += sum;
        if (sum)
          cnt++;
        else
          break;
        pre = sum;
        flag = 1 - flag;
      }
    }
    cout << cnt << ' ';
    cout << a << ' ' << b << "\n";
  }
}
