#include <bits/stdc++.h>
using namespace std;
long long int ar[500009], br[500009], cr[500009], dr[500009];
long long int fx[] = {-1, 1, 0, 0};
long long int fy[] = {0, 0, 1, -1};
map<long long int, long long int> mp, mp1;
vector<long long int> v[500009];
string s, d, q;
int main() {
  long long int a, b, c, i, j, k, x, y, z, f, g, h;
  cin >> a;
  while (a--) {
    cin >> b;
    for (i = 1; i <= b; i++) {
      cin >> ar[i];
    }
    i = 1;
    j = b;
    x = 0;
    k = 0;
    f = 0;
    h = 0;
    long long int m = 0;
    long long int n = 0;
    long long int p = 0;
    while (1) {
      k++;
      m = 0;
      p = 0;
      if (k % 2 == 1) {
        n++;
        z = 0;
        for (g = i; g <= j; g++) {
          z = z + ar[g];
          ar[g] = 0;
          if (z > x) {
            p = 1;
            i = g + 1;
            x = z;
            f += z;
            if (g != j) m = 1;
            break;
          }
        }
        if (p == 0) {
          f += z;
        }
      } else {
        n++;
        z = 0;
        for (g = j; g >= i; g--) {
          z = z + ar[g];
          ar[g] = 0;
          if (z > x) {
            p = 1;
            x = z;
            j = g - 1;
            h += z;
            if (g != i) m = 1;
            break;
          }
        }
        if (p == 0) {
          h += z;
        }
      }
      if (m == 0) {
        break;
      }
    }
    cout << n << " " << f << " " << h << endl;
  }
}
