#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int tc, a, b, l, lp, ca, cb, c, mv, temp, prev, ar[1005];
  cin >> lp;
  for (l = 0; l < lp; l++) {
    cin >> tc;
    for (a = 0; a < tc; a++) {
      cin >> ar[a];
    }
    prev = ar[0];
    a = 1;
    b = tc - 1;
    ca = ar[0];
    cb = 0;
    mv = 1;
    while (a <= b) {
      temp = 0;
      mv++;
      for (c = b; c >= a; c--) {
        temp = ar[c] + temp;
        if ((temp > prev) || (c == a)) {
          cb = cb + temp;
          prev = temp;
          b = c - 1;
          break;
        }
      }
      if (a > b) break;
      temp = 0;
      for (c = a; c <= b; c++) {
        temp = ar[c] + temp;
        if ((temp > prev) || (c == b)) {
          ca = ca + temp;
          prev = temp;
          a = c + 1;
          break;
        }
      }
      mv++;
    }
    cout << mv << " " << ca << " " << cb << endl;
  }
  return 0;
}
