#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long t;
  cin >> t;
  for (long long _ = 0; _ < (t); ++_) {
    long long n;
    cin >> n;
    vector<long long> a(n);
    for (long long i = 0; i < (n); ++i) {
      cin >> a[i];
    }
    long long ans1 = a[0], ans2 = 0;
    long long prev1 = ans1, prev2 = 0;
    long long l = 1, r = n - 1;
    long long ans0 = 1;
    bool flag = false;
    while (l <= r) {
      if (flag) {
        long long cur = 0;
        while (l <= r && cur <= prev2) {
          cur += a[l];
          l++;
        }
        ans1 += cur;
        prev1 = cur;
      } else {
        long long cur = 0;
        while (r >= l && cur <= prev1) {
          cur += a[r];
          r--;
        }
        ans2 += cur;
        prev2 = cur;
      }
      ans0++;
      flag = !flag;
    }
    cout << ans0 << ' ' << ans1 << ' ' << ans2 << "\n";
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
