#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tt;
  cin >> tt;
  while (tt--) {
    long long n;
    cin >> n;
    vector<long long> v(n);
    for (long long i = 0; i < n; i++) cin >> v[i];
    long long a = v[0], b = 0, k = 0;
    long long i = 1, j = n - 1;
    k++;
    bool f = false;
    long long eat_a = v[0], eat_b = 0;
    while (i <= j) {
      if (!f) {
        while (eat_b <= eat_a) {
          eat_b += v[j];
          j--;
          if (i > j) break;
        }
        b += eat_b;
        eat_a = 0;
        k++;
        f = true;
      } else {
        while (eat_a <= eat_b) {
          eat_a += v[i];
          i++;
          if (i > j) break;
        }
        a += eat_a;
        eat_b = 0;
        k++;
        f = false;
      }
    }
    cout << k << ' ' << a << ' ' << b << '\n';
  }
  return 0;
}
