func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 2e5 + 10;   int t, n;   int cnt, num, maxx;   int a[maxn];   int vis[maxn];   int m1[maxn];   int m2[maxn];   void init() {     num = 0;     maxx = 0;     memset(vis, 0, sizeof(vis));   }   int main() {     scanf( %d , &t);     while (t--) {       cnt = 0;       scanf( %d , &n);       for (int i = 1; i <= n; i++) scanf( %d , &a[i]);       for (int i = 1; i <= n; i++) m1[i] = 0, m2[i] = 0;       init();       for (int i = 1; i <= n; i++) {         maxx = max(maxx, a[i]);         if (!vis[a[i]]) {           num++;           vis[a[i]] = 1;         } else           break;         if (num == maxx)           m1[i] = 1;         else           m1[i] = 0;       }       init();       for (int i = n; i >= 1; i--) {         maxx = max(maxx, a[i]);         if (!vis[a[i]]) {           num++;           vis[a[i]] = 1;         } else           break;         if (num == maxx) {           m2[i] = 1;           if (i > 1 && m1[i - 1]) cnt++;         } else           m2[i] = 0;       }       printf( %d n , cnt);       for (int i = 1; i < n; i++)         if (m1[i] && m2[i + 1]) printf( %d %d n , i, n - i);     }     return 0;   }   