func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x3f3f3f3f;   const double EPS = 1e-9;   int T, n;   int num[1000015], p[1000015], cnt, sum[1000015];   int main() {     scanf( %d , &T);     while (T--) {       scanf( %d , &n);       for (int i = 1; i <= n; ++i) {         scanf( %d , &p[i]);       }       num[cnt = 1] = 1;       for (int i = 2; i <= n; ++i) {         if (p[i] == p[i - 1]) {           ++num[cnt];         } else {           num[++cnt] = 1;         }       }       for (int i = 1; i <= cnt; ++i) {         sum[i] = sum[i - 1] + num[i];       }       sum[cnt + 1] = INF;       int g = 0, s = 0, b = 0;       for (int i = 1, j = 2, k = 3; k <= n; ++i) {         while (j <= n && sum[j] - sum[i] <= sum[i]) ++j;         while (k < n && sum[k + 1] <= sum[cnt] / 2) ++k;         if (j <= n && k <= n && sum[i] < sum[k] - sum[j] &&             sum[k] <= sum[cnt] / 2) {           g = sum[i];           s = sum[j] - sum[i];           b = sum[k] - sum[j];         } else {           break;         }       }       printf( %d %d %d n , g, s, b);     }     return 0;   }   