#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a1[n];
    for (long long i = 0; i < n; i++) cin >> a1[i];
    long long i = 1;
    long long j = n - 1;
    long long a = a1[0];
    long long pre = a1[0];
    long long cur = 0;
    long long b = 0;
    long long s = 1;
    long long cnt = 1;
    long long r = 0;
    while (j >= i) {
      r = 1;
      if (cur <= pre) {
        if (s == 1) {
          b = b + a1[j];
          cur += a1[j];
          j--;
        } else {
          a = a + a1[i];
          cur = cur + a1[i];
          i++;
        }
      } else {
        if (s == 1)
          s = 0;
        else
          s = 1;
        pre = cur;
        cur = 0;
        cnt++;
      }
    }
    if (r == 1) cnt++;
    cout << cnt << " " << a << " " << b << endl;
  }
  return 0;
}
