#include <bits/stdc++.h>
const long long maxn = 2 * 100005;
using namespace std;
int X[] = {0, 1, 0, -1};
int Y[] = {-1, 0, 1, 0};
int rows, coloums;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n + 1];
    deque<long long> q;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      q.push_back(a[i]);
    }
    long long c = 0;
    long long aa = 0;
    long long bb = 0;
    long long a1 = 0;
    long long b1 = 0;
    int ii = 1;
    while (!q.empty()) {
      c++;
      if (ii % 2) {
        ii++;
        a1 = 0;
        while (!q.empty()) {
          long long xx = q.front();
          a1 += xx;
          aa += xx;
          q.pop_front();
          if (a1 > b1) break;
        }
      } else {
        ii++;
        b1 = 0;
        while (!q.empty()) {
          long long xx = q.back();
          b1 += xx;
          bb += xx;
          q.pop_back();
          if (b1 > a1) break;
        }
      }
    }
    cout << c << ' ' << aa << ' ' << bb << endl;
  }
}
