#include <bits/stdc++.h>
void solve() {
  std::deque<int> d;
  int n;
  std::cin >> n;
  while (n--) {
    int x;
    std::cin >> x;
    d.push_back(x);
  }
  int a = 0, b = 0, cnt = 1;
  int prev_a = 0, prev_b = 0;
  bool who = true;
  while (!d.empty()) {
    if (who) {
      prev_a += d.front();
      d.pop_front();
      if (prev_a > prev_b) {
        cnt += bool(d.size());
        a += prev_a;
        prev_b = 0;
        who = false;
      }
    } else {
      prev_b += d.back();
      d.pop_back();
      if (prev_b > prev_a) {
        cnt += bool(d.size());
        b += prev_b;
        prev_a = 0;
        who = true;
      }
    }
  }
  if (who) {
    a += prev_a;
  } else {
    b += prev_b;
  }
  std::cout << cnt << " " << a << " " << b << std::endl;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  int t;
  std::cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
