#include <bits/stdc++.h>
using namespace std;
long long i, j, n, m, t, k, x, z, a[100007];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> t;
  while (t--) {
    cin >> n;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
    }
    long long i = 0, j = n + 1, x = 0, z = 0, cnt = 0, x1 = 0, x2 = 0, f = 0;
    while (i < j) {
      x = 0, f = 0;
      i++;
      for (; i < j; i++) {
        if (f == 0) {
          cnt++;
          f = 1;
        }
        x1 += a[i];
        x += a[i];
        if (x > z) break;
      }
      z = 0;
      f = 0;
      j--;
      for (; i < j; j--) {
        if (f == 0) {
          cnt++;
          f = 1;
        }
        x2 += a[j];
        z += a[j];
        if (z > x) break;
      }
    }
    cout << cnt << " " << x1 << " " << x2 << "\n";
  }
  return 0;
}
