#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  deque<int> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  int a = 0, b = n;
  int cnt = 0;
  int suma = 0, sumb = 0;
  int cn = 0;
  int pcn = 0;
  while (A.size()) {
    while (cn <= pcn && A.size()) {
      cn += A[0];
      A.pop_front();
    }
    suma += cn;
    pcn = cn;
    cn = 0;
    cnt++;
    if (A.empty()) break;
    while (cn <= pcn && A.size()) {
      cn += A[A.size() - 1];
      A.pop_back();
    }
    sumb += cn;
    pcn = cn;
    cn = 0;
    cnt++;
  }
  printf("%d %d %d\n", cnt, suma, sumb);
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
