#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long INF = 1e12;
int pow1(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n];
    for (long long i = 0; i < n; i++) cin >> arr[i];
    long long a = 1, b = n - 1;
    long long a1 = arr[0];
    long long a2 = 0;
    long long ca = a1, cb = 0;
    long long mv = 1;
    long long num = n - 1;
    while (num > 0) {
      if (mv % 2 != 0) {
        while (num > 0 && cb <= ca) {
          cb += arr[b];
          b--;
          num--;
        }
        a2 += cb;
        ca = 0;
        mv++;
      } else {
        while (num > 0 && ca <= cb) {
          ca += arr[a];
          a++;
          num--;
        }
        a1 += ca;
        cb = 0;
        mv++;
      }
    }
    cout << mv << " " << a1 << " " << a2 << "\n";
  }
}
