#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long start = 0, end = n - 1;
    long long moves = 0, pre;
    long long ca = 0, cb = 0;
    while (end >= start) {
      moves++;
      long long eat = 0;
      if (moves % 2 != 0) {
        if (moves == 1) {
          eat += a[start];
          ca += a[start];
          start++;
        } else {
          while (eat <= pre && end >= start) {
            eat += a[start];
            ca += a[start];
            start++;
          }
        }
        pre = eat;
        if (end < start) break;
      } else {
        while (eat <= pre && end >= start) {
          eat += a[end];
          cb += a[end];
          end--;
        }
        pre = eat;
        if (end < start) break;
      }
    }
    cout << moves << " " << ca << " " << cb << endl;
  }
  return 0;
}
