#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q, n, a, b, i, j, step, pre_a, pre_b;
  cin >> q;
  while (q--) {
    cin >> n;
    a = b = 0;
    pre_a = 0, pre_b = 0;
    vector<long long> v(n);
    for (i = 0; i < n; i++) cin >> v[i];
    step = 1;
    i = 0, j = n - 1;
    while (i <= j) {
      if (step % 2 != 0) {
        pre_a = 0;
        while (pre_a <= pre_b && i <= j) {
          pre_a += v[i];
          a += v[i++];
        }
      } else {
        pre_b = 0;
        while (pre_a >= pre_b && i <= j) {
          pre_b += v[j];
          b += v[j--];
        }
      }
      step++;
    }
    cout << step - 1 << " " << a << " " << b << endl;
  }
}
