#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int r = 0; r < t; r++) {
    int n;
    cin >> n;
    deque<int> b;
    for (int i = 0; i < n; i++) {
      int y;
      cin >> y;
      b.push_back(y);
    }
    int p = b[0], k = 0, t, s1 = 0, s2 = 0, n2 = 0, n1 = 0;
    while (b.size() != 0) {
      t = p;
      p = 0;
      while (b.size() != 0) {
        n2 = 1;
        p = p + b[0];
        s1 += b[0];
        b.pop_front();
        if (p >= t && k == 0) break;
        if (p > t) break;
      }
      if (n2 == 1) k++;
      n2 = 0;
      t = p;
      p = 0;
      int j;
      while (b.size() != 0) {
        n1 = 1;
        j = b.size() - 1;
        p = p + b[j];
        s2 += b[j];
        b.pop_back();
        if (p > t) break;
      }
      if (n1 == 1) k++;
      n1 = 0;
    }
    cout << k << " ";
    cout << s1 << " " << s2 << "\n";
  }
}
