#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 8005;
int main() {
  ios_base::sync_with_stdio();
  cin.tie(0);
  cout.tie(0);
  ;
  long long t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    long long l = 1, r = n - 1, ans1 = 0, ans2 = 0, last, eatten = 0, a[n];
    bool who = false;
    for (int i = 0; i < n; ++i) cin >> a[i];
    ans1 = last = a[0];
    while (l <= r) {
      if (who) {
        long long temp = 0;
        while (l <= r && temp <= last) temp = temp + a[l++];
        ans1 = ans1 + temp;
        last = temp;
      } else {
        long long temp = 0;
        while (l <= r && temp <= last) temp = temp + a[r--];
        ans2 = ans2 + temp;
        last = temp;
      }
      who = who ^ 1;
      ++eatten;
    }
    cout << ++eatten << ' ' << ans1 << ' ' << ans2 << endl;
  }
  return 0;
}
