#include <bits/stdc++.h>
using namespace std;
int main() {
  int t_;
  cin >> t_;
  while (t_--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int turns = 0;
    int alice = 0;
    int bob = n - 1;
    int alice_candies = 0;
    int bob_candies = 0;
    int alice_candies_previous = 0;
    int bob_candies_previous = 0;
    while (alice <= bob) {
      turns++;
      alice_candies_previous = 0;
      while (alice <= bob && alice_candies_previous <= bob_candies_previous) {
        alice_candies += a[alice];
        alice_candies_previous += a[alice];
        alice++;
      }
      if (alice <= bob) {
        turns++;
        bob_candies_previous = 0;
        while (alice <= bob && bob_candies_previous <= alice_candies_previous) {
          bob_candies += a[bob];
          bob_candies_previous += a[bob];
          bob--;
        }
      }
    }
    cout << turns << " " << alice_candies << " " << bob_candies << endl;
  }
  return 0;
}
