#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ar[n];
    for (int i = 0; i < n; i++) {
      cin >> ar[i];
    }
    int i = 0, j = n - 1;
    int cnt = 1, a = ar[0], b = 0;
    int sum, sum1 = ar[0];
    while (i < j) {
      sum = 0;
      if (cnt % 2 == 1) {
        while (sum <= sum1 && i < j) {
          sum += ar[j];
          j--;
        }
        sum1 = sum;
        b += sum;
        cnt++;
      } else {
        while (sum <= sum1 && i < j) {
          i++;
          sum += ar[i];
        }
        sum1 = sum;
        a += sum;
        cnt++;
      }
    }
    cout << cnt << " " << a << " " << b << '\n';
  }
}
