func_code_string: #include <bits/stdc++.h>   using namespace std;   int arr[100007];   int main() {     int i, n, k, distinct, r;     map<int, int> M;     while (scanf( %d%d , &n, &k) == 2) {       bool flag = true;       M.clear();       distinct = 0;       for (i = 0; i < n; i++) {         scanf( %d , &arr[i]);         if (M[arr[i]] == 0) {           M[arr[i]]++;           distinct++;         } else if (flag) {           M[arr[i]]++;         }         if (distinct == k && flag) {           r = i;           flag = false;         }       }       if (distinct < k)         puts( -1 -1 );       else {         i = 0;         while (M[arr[i]] > 1) {           M[arr[i]]--;           i++;         }         if (i > r) i = r;         printf( %d %d n , i + 1, r + 1);       }     }     return 0;   }   