func_code_string: #include <bits/stdc++.h>   using namespace std;   set<int> s;   int solve(vector<int> v, int k, int n) {     s.clear();     for (int i = 0; i < k; i++) s.insert(v[i]);     if (s.size() == k && *(s.begin()) == 1 && *(s.rbegin()) == k) {       s.clear();       for (int i = k; i < n; i++) s.insert(v[i]);       if (s.size() == n - k && *(s.begin()) == 1 && *(s.rbegin()) == (n - k))         return 1;       else         return -1;     } else       return -1;   }   int main() {     int t, n, m;     cin >> t;     vector<int> ans;     while (t--) {       cin >> n;       vector<int> a(n);       m = 0;       ans.clear();       for (int i = 0; i < n; i++) {         cin >> a[i];         if (a[i] > m) m = a[i];       }       if (m > n - 1) {         cout <<  0 n ;         continue;       } else {         if (solve(a, m, n) != -1) ans.push_back(m);         if (solve(a, n - m, n) != -1 && m != n - m) ans.push_back(n - m);         cout << ans.size() << endl;         if (ans.size()) {           for (auto tl = ans.begin(); tl != ans.end(); tl++)             cout << *tl <<     << n - *tl << endl;         }       }     }   }   