#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int arr[n];
  int v[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  v[0] = arr[0];
  for (int i = 1; i < n; i++) v[i] = v[i - 1] + arr[i];
  int low = 0;
  int high = n - 1;
  int count = 0;
  bool bob = true;
  int prevsum = 0;
  int sum;
  while (low <= high) {
    count++;
    if (bob) {
      sum = 0;
      while (low <= high && sum <= prevsum) {
        sum += arr[low];
        low++;
      }
      bob = false;
      prevsum = sum;
    } else {
      sum = 0;
      while (high >= low && sum <= prevsum) {
        sum += arr[high];
        high--;
      }
      bob = true;
      prevsum = sum;
    }
  }
  cout << count << " " << v[low - 1] << " " << (v[n - 1] - v[high]) << "\n";
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
