#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    int arr[n], i, j, a = 0, b = 0, A = 0, B = 0, moves = 0;
    for (i = 0; i < n; ++i) {
      cin >> arr[i];
    }
    if (n == 1) {
      A = arr[0];
      moves = 1;
    } else if (n == 2) {
      A = arr[0];
      B = arr[1];
      moves = 2;
    } else {
      a = arr[0];
      A = A + a;
      i = 1;
      j = n - 1;
      moves++;
      while (i <= j) {
        while (b <= a && i <= j) {
          b = b + arr[j];
          j--;
        }
        a = 0;
        B = B + b;
        if (i <= j) {
          moves++;
        }
        while (a <= b && i <= j) {
          a = a + arr[i];
          i++;
        }
        b = 0;
        A = A + a;
        if (i <= j) {
          moves++;
        }
      }
      moves++;
    }
    cout << moves << " " << A << " " << B << "\n";
  }
  return 0;
}
