#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y,
                    long long int p = 1e9 + 7) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % p;
    }
    x = (x * x) % p;
    y = y >> 1;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t;
  cin >> t;
  while (t--) {
    long long int i, j, k, n, l;
    vector<long long int> v;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> k;
      v.push_back(k);
    }
    if (n == 1) {
      cout << 1 << " " << v[0] << " " << 0 << endl;
      continue;
    }
    i = 0;
    j = n;
    long long int c = 1;
    long long int sum = v[0];
    long long int u = 1;
    long long int p = 0;
    while (i != j) {
      if (u) {
        c++;
        j--;
        if (i == j) {
          j++;
          p = 1;
          c--;
          break;
        }
        long long int temp = v[j];
        while (temp <= sum) {
          j--;
          if (i == j) {
            p = 1;
            j++;
            break;
          }
          temp += v[j];
        }
        sum = temp;
        if (p) break;
        u = 0;
      } else {
        c++;
        i++;
        if (i == j) {
          p = 1;
          c--;
          i--;
          break;
        }
        if (p) break;
        long long int temp = v[i];
        while (temp <= sum) {
          i++;
          if (i == j) {
            p = 1;
            i--;
            break;
          }
          temp += v[i];
        }
        if (p) break;
        sum = temp;
        u = 1;
      }
    }
    long long int sum1 = 0, sum2 = 0;
    for (l = 0; l < i + 1; l++) sum1 += v[l];
    for (l = n - 1; l >= j; l--) sum2 += v[l];
    cout << c << " " << sum1 << " " << sum2 << endl;
  }
  return 0;
}
