#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int arr[n + 1];
    for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
    int start = 1, end = n - 1, ac = arr[0], at = arr[0], bc = 0, bt = 0,
        move = 1;
    while (start <= end) {
      if (move % 2) {
        for (bc = 0; bc <= ac && start <= end; end--) bc += arr[end];
        bt += bc;
        move++;
      } else {
        for (ac = 0; ac <= bc && start <= end; start++) ac += arr[start];
        at += ac;
        move++;
      }
    }
    printf("%d %d %d\n", move, at, bt);
  }
  return 0;
}
