#include <bits/stdc++.h>
using namespace std;
int n, t, a, b, i, j, mx, st, s_a, s_b, idx;
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    cin >> n;
    vector<int> ar(n);
    for (int i = 0; i < n; i++) cin >> ar[i];
    i = st = 0;
    j = n - 1;
    s_a = s_b = mx = 0;
    while (i <= j) {
      if (!(st & 1)) {
        a = 0;
        for (; i <= j && mx >= a; i++) a += ar[i];
        s_a += a;
        if (a > mx) mx = a;
      } else {
        b = 0;
        for (; i <= j && mx >= b; j--) b += ar[j];
        s_b += b;
        if (b > mx) mx = b;
      }
      ++st;
    }
    cout << st << ' ' << s_a << ' ' << s_b << '\n';
  }
  return 0;
}
