#include <bits/stdc++.h>
using namespace std;
void test_case() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int A = 0, B = n - 1;
  int last_sum = 0;
  bool turnA = true;
  int num_turns = 0;
  int totA = 0, totB = 0;
  while (A <= B) {
    num_turns++;
    int curSum = 0;
    if (turnA) {
      while (A <= B and curSum <= last_sum) {
        curSum += a[A++];
      }
      totA += curSum;
    } else {
      while (A <= B and curSum <= last_sum) {
        curSum += a[B--];
      }
      totB += curSum;
    }
    last_sum = curSum;
    turnA = not turnA;
  }
  printf("%d %d %d\n", num_turns, totA, totB);
}
int main() {
  int tests;
  cin >> tests;
  for (int i = 0; i < tests; ++i) {
    test_case();
  }
  return 0;
}
