func_code_string: #include <bits/stdc++.h>   using namespace std;   long long int power(long long int a, long long int b) {     long long int res = 1;     a %= 1000000007;     assert(b >= 0);     for (; b; b >>= 1) {       if (b & 1) res = res * a % 1000000007;       a = a * a % 1000000007;     }     return res;   }   long long int modInverse(long long int a) { return power(a, 1000000007 - 2); }   long long int gcd(long long int a, long long int b) {     if (b == 0) return a;     a %= b;     return gcd(b, a);   }   const int N = 500023;   bool vis[N];   vector<int> adj[N];   void solve() {     int n;     cin >> n;     vector<long long int> a(n + 1);     for (long long int i = 0; i < n; i++) cin >> a[i + 1];     int moves = 1;     long long int by_ana = 0;     long long int by_bob = 0;     int prev_a = 1;     int prev_b = n + 1;     by_ana += a[1];     int to_comp_by_bob = a[1];     int to_comp_by_ana = 0;     int turn = 2;     int f = 0;     int eaten[n + 1];     for (int i = 1; i <= n; i++) eaten[i] = 0;     eaten[1] = 1;     while (1) {       moves++;       int temp = 0;       if (prev_a == prev_b - 1 || prev_a > n || prev_b < 1) {         moves--;         break;       }       if (turn == 2) {         while (temp <= to_comp_by_bob) {           if (prev_b == prev_a || prev_b < 1) {             f = 1;             break;           }           prev_b--;           if (eaten[prev_b] == 1) {             f = 1;             break;           }           temp += a[prev_b];           by_bob += a[prev_b];           eaten[prev_b] = 1;         }         to_comp_by_ana = temp;         turn = 1;         if (f == 1) break;       } else if (turn == 1) {         while (temp <= to_comp_by_ana) {           if (prev_b == prev_a || prev_a > n) {             f = 1;             break;           }           prev_a++;           if (eaten[prev_a] == 1) {             f = 1;             break;           }           temp += a[prev_a];           by_ana += a[prev_a];           eaten[prev_a] = 1;         }         if (f == 1) break;         to_comp_by_bob = temp;         turn = 2;       }       if (f == 1) {         if (temp == 0) moves--;         break;       }     }     if (n == 1) moves = 1;     cout << moves <<     << by_ana <<     << by_bob << endl;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int T = 1;     cin >> T;     int t = 0;     while (t++ < T) {       solve();     }     cerr <<  Time :   << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC          <<  ms n ;   }   