#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    list<int> l1;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      l1.push_back(x);
    }
    int a = 0, b = 0, m = 0;
    int alice = 0, bob = 0;
    bool f = false;
    while (!l1.empty()) {
      while (!l1.empty() and alice <= bob) {
        alice += l1.front();
        l1.pop_front();
        f = true;
      }
      a += alice;
      if (f) m++;
      f = false;
      bob = 0;
      while (!l1.empty() and bob <= alice) {
        bob += l1.back();
        l1.pop_back();
        f = true;
      }
      b += bob;
      if (f) m++;
      f = false;
      alice = 0;
    }
    cout << m << " " << a << " " << b << endl;
  }
}
