#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a * (b / gcd(a, b));
}
int main() {
  int t;
  cin >> t;
  for (int x = 0; x < t; x++) {
    int n;
    cin >> n;
    vector<int> v;
    for (int i = 0; i < n; i++) {
      int p;
      cin >> p;
      v.push_back(p);
    }
    int l = 0, r = n - 1;
    int sum1 = 0, sum2 = 0;
    int moves = 0, ans1 = 0, ans2 = 0;
    while (l <= r) {
      if (moves % 2 == 0) {
        int nsum1 = 0;
        while (l <= r && nsum1 <= sum2) nsum1 += v[l++];
        sum1 = nsum1;
        ans1 += nsum1;
      }
      if (moves % 2 == 1) {
        int nsum2 = 0;
        while (l <= r && nsum2 <= sum1) nsum2 += v[r--];
        ans2 += nsum2;
        sum2 = nsum2;
      }
      moves++;
    }
    cout << moves << " " << ans1 << " " << ans2 << "\n";
  }
}
