#include <bits/stdc++.h>
using namespace std;
int a[1005];
int main() {
  int t;
  scanf("%d", &t);
  for (int ti = 1; ti <= t; ti++) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    int l = 1;
    int r = n;
    int num = 0;
    int resa = 0;
    int resb = 0;
    int resh = 0;
    while (l <= r) {
      num++;
      if (num % 2) {
        int res1 = 0;
        for (int i = l; i <= r; i++) {
          l++;
          res1 += a[i];
          if (res1 > resh) {
            resa += res1;
            resh = res1;
            break;
          }
          if (i == r) {
            resa += res1;
          }
        }
      } else {
        int res2 = 0;
        for (int i = r; i >= l; i--) {
          r--;
          res2 += a[i];
          if (res2 > resh) {
            resb += res2;
            resh = res2;
            break;
          }
          if (i == l) {
            resb += res2;
          }
        }
      }
    }
    printf("%d %d %d\n", num, resa, resb);
  }
  return 0;
}
