#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int ara[n];
    for (long long int i = 0; i < n; i++) {
      cin >> ara[i];
    }
    long long int cnt = 0;
    long long int sum1 = 0;
    long long int sum2 = 0;
    long long int a = 0;
    long long int b = 0;
    long long int i = 0, j = n - 1;
    while (i <= j) {
      if (cnt % 2 == 0) {
        a = 0;
        while (a <= b and i <= j) {
          a += ara[i];
          i++;
        }
        sum1 += a;
        cnt++;
      } else {
        b = 0;
        while (b <= a and i <= j) {
          b += ara[j];
          j--;
        }
        cnt++;
        sum2 += b;
      }
    }
    cout << cnt << " " << sum1 << " " << sum2 << endl;
  }
}
