#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    long long int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int l = 0, r = n - 1;
    long long int x = 0, b = 0;
    int count = 0;
    long long int sum1 = 0, sum2 = 0;
    while (l <= r) {
      bool flag = false;
      while (l <= r and sum1 <= sum2) {
        x += a[l];
        flag = true;
        sum1 += a[l];
        l++;
      }
      if (flag) {
        count++;
      }
      sum2 = 0;
      bool fll = false;
      while (l <= r and sum2 <= sum1) {
        b += a[r];
        fll = true;
        sum2 += a[r];
        r--;
      }
      if (fll) {
        count++;
      }
      sum1 = 0;
    }
    cout << count << " " << x << " " << b << endl;
  }
}
