#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    int ar[n];
    for (long long i = 0; i < n; i++) {
      cin >> ar[i];
    }
    long long a = 0, b = 0, c = 0;
    long long i = 0, j = n - 1;
    long long x = 0, y = 0;
    while (i <= j) {
      if (c == 0) {
        x = ar[0];
        i++;
        c++;
      } else {
        x = 0;
        while (x <= y && i <= j) {
          x += ar[i];
          i++;
        }
        c++;
      }
      a += x;
      y = 0;
      while (y <= x && i <= j) {
        y += ar[j];
        j--;
      }
      if (y != 0) c++;
      b += y;
    }
    cout << c << " " << a << " " << b << endl;
  }
  return 0;
}
