#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const int MOD = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int tc;
  cin >> tc;
  while (tc--) {
    int n;
    cin >> n;
    vector<int> a(n);
    int sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      sum += a[i];
    }
    int sa = a[0], sb = 0;
    int i = 1, j = n - 1;
    int la = a[0], lb = 0;
    int moves = 1;
    sum -= a[0];
    while (i <= j) {
      if (moves % 2 == 0) {
        if (sum < lb) {
          sa += sum;
          moves++;
          break;
        } else {
          int s = 0;
          while (i <= j && s <= lb) s += a[i++];
          la = s;
          sa += s;
          sum -= s;
        }
      } else {
        if (sum < la) {
          sb += sum;
          moves++;
          break;
        } else {
          int s = 0;
          while (i <= j && s <= la) s += a[j--];
          lb = s;
          sb += s;
          sum -= s;
        }
      }
      moves++;
    }
    cout << moves << ' ' << sa << ' ' << sb << endl;
  }
}
