#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
      cin >> v[i];
    }
    int cnt = 1;
    int al = v[0];
    int bo = 0;
    int st = 1;
    int en = n - 1;
    int rsum = v[0];
    bool flag = true;
    while (st <= en) {
      if (flag == true) {
        int csum = 0;
        while (en >= st) {
          csum = csum + v[en];
          en--;
          if (csum > rsum) {
            bo = bo + csum;
            cnt++;
            rsum = csum;
            flag = false;
            break;
          }
        }
        if (en < st) {
          if (flag != false) {
            cnt++;
            bo = bo + csum;
          }
        }
      } else {
        int csum = 0;
        while (st <= en) {
          csum = csum + v[st];
          st++;
          if (csum > rsum) {
            cnt++;
            al = al + csum;
            rsum = csum;
            flag = true;
            break;
          }
        }
        if (st > en) {
          if (flag != true) {
            cnt++;
            al = al + csum;
          }
        }
      }
    }
    cout << cnt << " " << al << " " << bo << "\n";
  }
  return 0;
}
