#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    int i = 0, j = n - 1, eaten_last_time = 0;
    int steps = 0, alice = 0, bob = 0;
    while (true) {
      int eaten = 0;
      if ((steps % 2) == 0) {
        while (i <= j && eaten <= eaten_last_time) {
          eaten += a[i];
          i++;
        }
        alice += eaten;
      } else {
        while (j >= i && eaten <= eaten_last_time) {
          eaten += a[j];
          j--;
        }
        bob += eaten;
      }
      if (eaten > 0) {
        steps++;
      }
      if (eaten <= eaten_last_time) {
        break;
      }
      eaten_last_time = eaten;
    }
    printf("%d %d %d\n", steps, alice, bob);
  }
  return 0;
}
