#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1;
const int SIZE = 2e5 + 100;
const double eps = 1e-7;
const int mod = 1e+7;
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;
template <typename XPAX>
void ckma(XPAX &x, XPAX y) {
  x = (x < y ? y : x);
}
template <typename XPAX>
void ckmi(XPAX &x, XPAX y) {
  x = (x > y ? y : x);
}
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int first = 0;
  cerr << '{';
  for (auto &i : x) cerr << (first++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
auto random_address = [] {
  char *p = new char;
  delete p;
  return (uint64_t)p;
};
bool isPrime(long long n) {
  if (n == 0 || n == 1) {
    return false;
  } else {
    for (long long i = 2; i * i <= n; ++i) {
      if (n % i == 0) {
        return false;
        break;
      }
    }
  }
  return true;
}
int check1(int n) {
  int ans = 0;
  while (n % 2 == 0) {
    ans++;
    n /= 2;
  }
  for (int i = 3; i * i <= n; i = i + 2) {
    while (n % i == 0) {
      ans++;
      n /= i;
    }
  }
  if (n > 2) {
    ans++;
  }
  return ans;
}
int c[1010];
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> c[i];
  int l = 1, r = n;
  int count1 = 0;
  int flag = 0, x = 0;
  int a = 0, b = 0, now;
  while (l <= r) {
    if (flag == 0) {
      now = 0;
      while (x >= now && l <= r) {
        now = now + c[l++];
      }
      a = a + now;
      flag = 1;
      count1++;
    } else {
      now = 0;
      while (x >= now && l <= r) {
        now = now + c[r--];
      }
      b = b + now;
      flag = 0;
      count1++;
    }
    x = now;
  }
  cout << count1 << " " << a << " " << b << endl;
}
void test_case() {}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
