#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int j = 0; j < t; j++) {
    int n;
    cin >> n;
    vector<int> candies;
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      candies.push_back(a);
    }
    int alicesum = 0, bobsum = 0, moves = 0, alicetemp = 0, bobtemp = 0;
    while (!candies.empty()) {
      if (alicetemp <= bobtemp) {
        while (!candies.empty()) {
          alicesum += candies[0];
          alicetemp += candies[0];
          candies.erase(candies.begin());
          if (alicetemp > bobtemp) {
            break;
          }
        }
        moves++;
      }
      bobtemp = 0;
      if (candies.empty()) {
        cout << moves << " " << alicesum << " " << bobsum << endl;
        break;
      }
      if (bobtemp <= alicetemp) {
        while (!candies.empty()) {
          bobsum += candies[candies.size() - 1];
          bobtemp += candies[candies.size() - 1];
          candies.pop_back();
          if (bobtemp > alicetemp) {
            break;
          }
        }
        moves++;
      }
      alicetemp = 0;
      if (candies.empty()) {
        cout << moves << " " << alicesum << " " << bobsum << endl;
        break;
      }
    }
  }
  return 0;
}
