#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test = 1;
  cin >> test;
  while (test--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (long long i = 0; i < n; ++i) {
      cin >> a[i];
    }
    int al = 0, bo = n - 1;
    int pal = 0, pb = 0;
    long long tal = 0, tbo = 0;
    int moves = 0;
    int f = 1;
    while (al <= bo) {
      if (f) {
        long long s = 0;
        while (s <= pb and al <= bo) {
          s += a[al];
          al++;
        }
        moves++;
        tal += s;
        f = !f;
        pal = s;
      } else {
        long long s = 0;
        while (s <= pal and bo >= al) {
          s += a[bo];
          bo--;
        }
        moves++;
        tbo += s;
        f = !f;
        pb = s;
      }
    }
    cout << moves << " " << tal << " " << tbo << "\n";
  }
}
