#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    int i = 1, j = n - 1, flag = 1;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    long long int ls = a[0], rs = 0, size = a[0], count = 1;
    while (i <= j) {
      long long int csize = 0;
      if (flag % 2) {
        while (j >= i) {
          csize += a[j];
          j--;
          if (csize > size) break;
        }
        rs += csize;
      } else {
        while (i <= j) {
          csize += a[i];
          i++;
          if (csize > size) break;
        }
        ls += csize;
      }
      flag++;
      size = max(size, csize);
      count++;
    }
    cout << count << " " << ls << " " << rs << "\n";
  }
  return 0;
}
