#include <bits/stdc++.h>
using namespace std;
void INP();
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  if (0) return;
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  if (0) return;
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void alpha() {
  long long int n;
  cin >> n;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int alice_total = arr[0], bob_total = 0, moves_total = 1;
  long long int alice_prev = arr[0], bob_prev = 0, alice_curr = 0, bob_curr = 0;
  bool turn_alice = false;
  long long int i = 1, j = n - 1;
  while (i <= j) {
    if (!turn_alice) {
      while (bob_curr <= alice_prev and i <= j) {
        bob_curr += arr[j];
        bob_total += arr[j];
        j--;
      }
      moves_total++;
      bob_prev = bob_curr;
      bob_curr = 0;
      turn_alice = true;
    }
    if (i > j) break;
    if (turn_alice) {
      while (alice_curr <= bob_prev and i <= j) {
        alice_curr += arr[i];
        alice_total += arr[i];
        i++;
      }
      moves_total++;
      alice_prev = alice_curr;
      alice_curr = 0;
      turn_alice = false;
    }
  }
  cout << moves_total << " " << alice_total << " " << bob_total << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  INP();
  long long int t = 1;
  cin >> t;
  while (t--) alpha();
  return 0;
}
inline void INP() {}
