#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<int> A(n);
    for (int &x : A) {
      cin >> x;
    }
    int move = 1, a = A[0], b = 0;
    for (int i = 1, j = n - 1, l = 0, preA = a, preB = 0; i <= j; l++) {
      if (l & 1) {
        preA = 0;
        while (i <= j && preA <= preB) {
          preA += A[i];
          a += A[i++];
        }
      } else {
        preB = 0;
        while (j >= i && preB <= preA) {
          preB += A[j];
          b += A[j--];
        }
      }
      move++;
    }
    cout << move << ' ' << a << ' ' << b << endl;
  }
  return 0;
}
