#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const int inf = 1e9;
const int N = 1e5 + 2;
bool flag;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& it : a) cin >> it;
  int i = 0, j = (int)a.size() - 1, sum1 = 0, sum2 = 0, steps = 0, tmp1 = 0,
      tmp2 = 0;
  while (i <= j) {
    steps++;
    if (steps & 1) {
      while (i <= j && tmp1 <= tmp2) sum1 += a[i], tmp1 += a[i++];
      tmp2 = 0;
    } else {
      while (i <= j && tmp2 <= tmp1) sum2 += a[j], tmp2 += a[j--];
      tmp1 = 0;
    }
  }
  cout << steps << ' ' << sum1 << ' ' << sum2;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt = 1;
  cin >> tt;
  while (tt--) {
    flag = 0;
    solve();
    cout << '\n';
  }
  return 0;
}
