#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, a = 0, b = 0, cur = 0, last = 0, cnt = 0;
    cin >> n;
    vector<int> x(n);
    for (int i = 0; i < n; i++) cin >> x[i];
    int l = 0, r = n - 1;
    while (l <= r) {
      cur = 0;
      if (cnt % 2 == 0) {
        while (l <= r && cur <= last) {
          cur += x[l];
          l++;
        }
        a += cur;
      } else {
        while (r >= l && cur <= last) {
          cur += x[r];
          r--;
        }
        b += cur;
      }
      last = cur;
      cnt++;
    }
    cout << cnt << " " << a << " " << b << '\n';
  }
}
