#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int aa = 0, b = 0, prevA = 0, prevB = 0, k = 0;
    int i = 0, j = n - 1;
    int turn = 1;
    while (i <= j) {
      if (turn) {
        int s = 0;
        while (i <= j && s <= prevB) s += a[i++];
        aa += s;
        prevA = s;
        turn = 0;
      } else {
        int s = 0;
        while (i <= j && s <= prevA) s += a[j--];
        b += s;
        prevB = s;
        turn = 1;
      }
      k++;
    }
    cout << k << " " << aa << " " << b << "\n";
  }
  return 0;
}
