#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t, n, candies_arr[1000], min_start, left_ptr, right_ptr, num_moves,
      a_count, b_count, curr_count;
  bool is_right, to_perform;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n;
    for (int j = 0; j < n; j++) {
      cin >> candies_arr[j];
    }
    if (n > 1) {
      min_start = candies_arr[0] + 1;
      left_ptr = 1;
      right_ptr = n - 1;
      is_right = true;
      to_perform = true;
      num_moves = 1;
      a_count = candies_arr[0];
      b_count = 0;
      while (to_perform) {
        curr_count = 0;
        if (is_right) {
          is_right = false;
          while (left_ptr <= right_ptr && curr_count < min_start) {
            curr_count += candies_arr[right_ptr];
            right_ptr--;
          }
          b_count += curr_count;
          if (left_ptr > right_ptr) {
            to_perform = false;
          }
        } else {
          is_right = true;
          while (left_ptr <= right_ptr && curr_count < min_start) {
            curr_count += candies_arr[left_ptr];
            left_ptr++;
          }
          a_count += curr_count;
          if (left_ptr > right_ptr) {
            to_perform = false;
          }
        }
        min_start = curr_count + 1;
        num_moves++;
      }
      cout << num_moves << " " << a_count << " " << b_count << "\n";
    } else {
      cout << "1 " << candies_arr[0] << " 0\n";
    }
  }
}
