#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    int x = 0;
    int temp = 0;
    int now = 0;
    int aa = 0;
    int bb = 0;
    int l = 0;
    int r = n;
    while (l <= r) {
      if (temp % 2 == 0) {
        temp++;
        while (l <= r && now <= x) {
          now += a[l];
          l++;
        }
        aa += now;
        x = now;
        now = 0;
      } else {
        temp++;
        while (l <= r && now <= x) {
          now += a[r];
          r--;
        }
        bb += now;
        x = now;
        now = 0;
      }
    }
    cout << temp << " " << aa << " " << bb << endl;
  }
}
