#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int a[n];
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    int l = 0, r = n;
    int prev = 0;
    int A = a[0];
    int B = 0;
    int prevSum = a[0];
    bool flag = true;
    int moves = 1;
    if (n == 1) flag = false;
    while (flag) {
      moves++;
      if (prev == 0) {
        int curSum = 0;
        while (curSum <= prevSum) {
          r--;
          if (r <= l) {
            flag = false;
            break;
          }
          curSum += a[r];
        }
        B += curSum;
        prev = 1;
        prevSum = curSum;
      } else {
        int curSum = 0;
        while (curSum <= prevSum) {
          l++;
          if (l >= r) {
            flag = false;
            break;
          }
          curSum += a[l];
        }
        A += curSum;
        prev = 0;
        prevSum = curSum;
      }
      if (l == r - 1) break;
    }
    printf("%d %d %d\n", moves, A, B);
  }
  return 0;
}
