#include <bits/stdc++.h>
using namespace std;
long long arr[1005];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    for (long long i = 0; i < n; i++) {
      cin >> arr[i];
    }
    long long left = 1;
    long long right = n - 1;
    long long cnt = 1;
    long long leftSum, rightSum;
    leftSum = rightSum = 0;
    leftSum = arr[0];
    long long turn = 1;
    long long prevSum = arr[0];
    while (left <= right) {
      if (turn == 0) {
        long long currSum = 0;
        while (currSum <= prevSum) {
          currSum += arr[left];
          left++;
          if (left > right) break;
        }
        prevSum = currSum;
        leftSum += currSum;
        turn = 1;
      } else {
        long long currSum = 0;
        while (currSum <= prevSum) {
          currSum += arr[right];
          right--;
          if (left > right) break;
        }
        prevSum = currSum;
        rightSum += currSum;
        turn = 0;
      }
      cnt++;
    }
    cout << cnt << " " << leftSum << " " << rightSum << "\n";
  }
  return 0;
}
