#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> arr(n);
    for (int i = 0; i < n; ++i) cin >> arr[i];
    int l = 0, r = n - 1;
    int ans = 0;
    int lsum = 0, rsum = 0;
    int currsum = 0;
    while (l <= r) {
      if (ans % 2 == 0) {
        int sum = 0;
        while (l <= r && sum <= currsum) {
          sum += arr[l++];
        }
        lsum += sum;
        currsum = sum;
      } else {
        int sum = 0;
        while (l <= r && sum <= currsum) sum += arr[r--];
        rsum += sum;
        currsum = sum;
      }
      ans++;
    }
    cout << ans << " " << lsum << " " << rsum << endl;
  }
}
