#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v(n);
    vector<int> a, b;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      v.push_back(x);
    }
    int count = 0;
    int p = 0;
    int q = 0;
    reverse(v.begin(), v.end());
    int ans = 0;
    while (1) {
      count++;
      int sum = 0;
      int c = 0;
      for (int i = v.size() - 1; i >= 0; i--) {
        sum += v[i];
        if (count % 2 == 1) {
          a.push_back(v[i]);
        } else {
          b.push_back(v[i]);
        }
        c++;
        if (sum > ans) {
          ans = sum;
          break;
        }
      }
      reverse(v.begin(), v.end());
      v.erase(v.begin(), v.begin() + c);
      if (v.size() == 0) {
        break;
      }
    }
    for (int i = 0; i < a.size(); i++) {
      p += a[i];
    }
    for (int i = 0; i < b.size(); i++) {
      q += b[i];
    }
    cout << count << " " << p << " " << q << endl;
  }
}
