#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; i++) cin >> k, v.push_back(k);
    int sum1 = 0, sum2 = 0, s1 = 0, s2 = 0, cnt = 0, flag = 0;
    while (!v.empty()) {
      while (!v.empty() && s1 <= s2 && !flag) {
        s1 += v.front();
        sum1 += v.front();
        v.erase(v.begin());
      }
      flag ^= 1;
      s2 = 0;
      cnt++;
      if (v.empty()) break;
      while (!v.empty() && s2 <= s1 && flag) {
        s2 += v.back();
        sum2 += v.back();
        v.erase(v.end() - 1);
      }
      flag ^= 1;
      s1 = 0;
      cnt++;
      if (v.empty()) break;
    }
    cout << cnt << " " << sum1 << " " << sum2 << endl;
  }
}
