#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, a = 0, b = 0, cnt = 0, m = 0;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    int i = 0, j = n - 1;
    while (i <= j) {
      int res = 0;
      while (res <= m) {
        res += arr[i];
        if (arr[i] == 0) {
          break;
        }
        arr[i] = 0;
        i++;
      }
      a += res;
      cnt++;
      if (i > j) {
        break;
      }
      m = res;
      res = 0;
      while (res <= m) {
        if (arr[j] == 0) {
          break;
        }
        res += arr[j];
        arr[j] = 0;
        j--;
      }
      b += res;
      m = res;
      cnt++;
    }
    cout << cnt << " " << a << " " << b << endl;
  }
  return 0;
}
