#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long left = 0, right = n - 1;
  long long ct = 1;
  int flag = 1;
  long long moves = 0, a = 0, b = 0;
  while (left <= right) {
    moves++;
    long long count = 0;
    if (flag) {
      while (left <= right && count < ct) {
        count += arr[left];
        a += arr[left];
        left++;
      }
      ct = count + 1;
      flag = 0;
    } else {
      while (left <= right && count < ct) {
        count += arr[right];
        b += arr[right];
        right--;
      }
      ct = count + 1;
      flag = 1;
    }
  }
  cout << moves << " " << a << " " << b << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
