#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int a1 = 0, b1 = 0, mv = 0, hi = n - 1, lo = 0, prev = 0, flg = 0;
  while (1) {
    int now = 0;
    mv++;
    if (!flg) {
      flg = 1;
      int start = lo;
      while (hi >= start and prev >= now) {
        now += v[start++];
      }
      a1 += now;
      prev = now;
      if (hi < start) {
        cout << mv << " ";
        break;
      }
      lo = start;
    } else {
      flg = 0;
      int end = hi;
      while (lo <= end and prev >= now) {
        now += v[end--];
      }
      b1 += now;
      prev = now;
      if (lo > end) {
        cout << mv << " ";
        break;
      }
      hi = end;
    }
  }
  cout << a1 << " " << b1 << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
