#include <bits/stdc++.h>
using namespace std;
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
long long powermod(long long base, long long exp, long long mod) {
  long long result = 1;
  while (exp != 0) {
    if ((exp % 2) == 1) {
      result = (result * base) % mod;
    }
    base = (base * base) % mod;
    exp /= 2;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ios_base& scientific(ios_base & str);
  int t;
  cin >> t;
  int tt = t;
  while (t--) {
    long long int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int si = 0;
    int sj = 0;
    int c = 0;
    long long int sii;
    long long int sjj;
    sii = sjj = 0;
    int i = 0;
    int j = n - 1;
    int te = 1;
    while (i <= j) {
      c++;
      if (te == 1) {
        si = 0;
        while (si <= sj && i <= j) {
          si += a[i];
          i++;
        }
        te *= -1;
        sii += si;
      } else {
        sj = 0;
        while (sj <= si && i <= j) {
          sj += a[j];
          j--;
        }
        te *= -1;
        sjj += sj;
      }
    }
    cout << c << " " << sii << " " << sjj << endl;
  }
  return 0;
}
