#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
double getTime() { return clock() / (double)CLOCKS_PER_SEC; }
void read(){};
template <typename T, typename... Args>
void read(T& a, Args&... args) {
  cin >> a;
  read(args...);
}
void print(){};
template <typename T, typename... Args>
void print(T a, Args... args) {
  cout << a << " \n"[sizeof...(args) == 0];
  print(args...);
}
void solve() {
  int n;
  cin >> n;
  deque<int> dq;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    dq.push_back(x);
  }
  int turn = 0;
  int prv = 0;
  int a = 0, b = 0;
  int moves = 0;
  while (!dq.empty()) {
    if (turn == 0) {
      int sum = 0;
      while (!dq.empty() and sum <= prv) {
        sum += dq.front();
        dq.pop_front();
      }
      a += sum;
      prv = sum;
    } else {
      int sum = 0;
      while (!dq.empty() and sum <= prv) {
        sum += dq.back();
        dq.pop_back();
      }
      b += sum;
      prv = sum;
    }
    turn ^= 1;
    moves++;
  }
  print(moves, a, b);
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
