#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int a = arr[0], b = 0, move = 1, prev = arr[0], last = 1, left = 1,
        right = n - 1;
    while (left <= right) {
      int cur = 0;
      if (last == 1) {
        while (left <= right && cur <= prev) cur += arr[right--];
        b += cur;
        move++;
        last = 2;
        prev = cur;
      } else {
        while (left <= right && cur <= prev) cur += arr[left++];
        a += cur;
        move++;
        last = 1;
        prev = cur;
      }
    }
    cout << move << " " << a << " " << b << "\n";
  }
  return 0;
}
