#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ara[n];
    for (int i = 0; i < n; i++) cin >> ara[i];
    int ltind = 0, rtind = n - 1, alice = 0, bob = 0, move = 0, sum = 0,
        crnt = 0;
    while (ltind <= rtind) {
      while (crnt <= sum && ara[ltind] > 0) {
        crnt += ara[ltind];
        alice += ara[ltind];
        ara[ltind] = 0;
        ltind++;
      }
      sum = crnt;
      crnt = 0;
      if (ltind <= rtind) move++;
      while (crnt <= sum && ara[rtind] > 0) {
        crnt += ara[rtind];
        bob += ara[rtind];
        ara[rtind] = 0;
        rtind--;
      }
      sum = crnt;
      crnt = 0;
      move++;
    }
    cout << move << " " << alice << " " << bob << "\n";
  }
  return 0;
}
