#include <bits/stdc++.h>
int isPrime(int n) {
  int i;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (i = 3; i <= sqrt(n); i += 2)
    if (n % i == 0) return 0;
  return 1;
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> arr(n + 1);
    for (int i = 1; i <= n; ++i) {
      cin >> arr[i];
    }
    int l = 1, r = n;
    int a = 0, b = 0, prv = 0, moves = 0;
    char pl = 'a';
    while (l <= r) {
      if (pl == 'a') {
        moves++;
        int cur = 0;
        while (cur <= prv && l <= r) {
          cur += arr[l];
          a += arr[l];
          l++;
        }
        prv = cur;
        pl = 'b';
      } else {
        moves++;
        int cur = 0;
        while (cur <= prv && l <= r) {
          cur += arr[r];
          b += arr[r];
          r--;
        }
        prv = cur;
        pl = 'a';
      }
    }
    cout << moves << " " << a << " " << b << '\n';
  }
  return 0;
}
