#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
int a[maxn];
int n;
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    int cntL, cntR;
    cntL = cntR = 0;
    int L = 1, R = n;
    bool turn = false;
    int lastL = 0, lastR = 0;
    bool fin = false;
    int cnt = 0;
    while (1) {
      if (!turn) {
        int now = 0;
        while (now <= lastR) {
          now += a[L];
          L++;
          if (L > R) {
            fin = true;
            break;
          }
        }
        cntL += now;
        lastL = now;
      } else {
        int now = 0;
        while (now <= lastL) {
          now += a[R];
          R--;
          if (L > R) {
            fin = true;
            break;
          }
        }
        cntR += now;
        lastR = now;
      }
      turn = !turn;
      cnt++;
      if (fin) break;
    }
    cout << cnt << " " << cntL << " " << cntR << "\n";
  }
}
