#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const long long maxn = 1e6 + 7;
const long long mod = 1e9 + 7;
deque<long long> q;
long long s[maxn];
long long m, n, i, j, sum, res, t;
int main() {
  long long T;
  cin >> T;
  while (T--) {
    long long a, b;
    cin >> n;
    for (i = 1; i <= n; i++) {
      cin >> s[i];
      q.push_back(s[i]);
    }
    t = 0, res = 0;
    a = 0, b = 0, sum = 0;
    while (!q.empty()) {
      while (sum <= t && !q.empty()) {
        sum += q.front();
        q.pop_front();
      }
      a += sum;
      t = sum;
      sum = 0;
      res++;
      if (q.empty()) break;
      while (sum <= t && !q.empty()) {
        sum += q.back();
        q.pop_back();
      }
      b += sum;
      t = sum;
      sum = 0;
      res++;
    }
    cout << res << ' ' << a << ' ' << b << endl;
  }
  return 0;
}
