#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t, a, b, n, i, j, cnt, sum, sum1;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<long long> v(n);
    sum = 0, sum1 = 0;
    for (i = 0; i < n; i++) cin >> v[i];
    a = v[0], b = 0, cnt = 1, sum1 = v[0], v[0] = 0;
    for (j = n - 1, i = 1; j >= 0, i < n;) {
      while (v[j] != 0 && b <= a) {
        sum += v[j];
        b += v[j];
        v[j] = 0;
        if (b > a) {
          cnt++;
          a = 0;
          j--;
          break;
        } else if (b <= a && j == i && b > 0) {
          cnt++;
          j--;
          break;
        } else
          j--;
      }
      while (v[i] != 0 && a <= b) {
        sum1 += v[i];
        a += v[i];
        v[i] = 0;
        if (a > b) {
          cnt++;
          b = 0;
          i++;
          break;
        } else if (a <= b && i == j && a > 0) {
          cnt++;
          i++;
          break;
        } else
          i++;
      }
      if (v[i] == 0 && v[j] == 0) break;
    }
    cout << cnt << " " << sum1 << " " << sum << "\n";
  }
}
