#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n + 5];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int l = 0, r = n, a = 0, b = 0, tmpa = 0, tmpb = 0, turn = 0, dem = 0;
    while (l < r) {
      if (turn == 0) {
        tmpa += arr[l];
        if (tmpa <= tmpb) {
          l++;
          if (l == r) a += tmpa, dem++;
        } else
          a += tmpa, tmpb = 0, r--, turn = 1, dem++;
      } else {
        tmpb += arr[r];
        if (tmpb <= tmpa) {
          r--;
          if (l == r) b += tmpb, dem++;
        } else
          b += tmpb, tmpa = 0, l++, turn = 0, dem++;
      }
    }
    cout << dem << " " << a << " " << b << "\n";
  }
}
