func_code_string: #include <bits/stdc++.h>   using namespace std;   int main(void) {     int n;     scanf( %d , &n);     int v[n];     for (int i = 0; i < n; i++) scanf( %d , v + i);     if (n > 2) {       for (int i = 0; i + 3 <= n; i++) {         int a = v[i], b = v[i + 1], c = v[i + 2];         int ans1 = -1, ans2 = -1;         set<int> ms;         ms.insert(a);         ms.insert(b);         ms.insert(c);         if (ms.size() == 1)           continue;         else if (ms.size() == 3) {           if (a == *ms.begin())             ans1 = i, ans2 = i + 1;           else if (a == *(++ms.begin()))             ans1 = i, ans2 = i + 2;           else if (a == *ms.rbegin())             ans1 = i, ans2 = i + 1;         } else if (ms.size() == 2) {           if (a == c) {             int d = -1;             if (i > 0) {               d = v[i - 1];               if (d != a)                 ans1 = i - 1, ans2 = i;               else                 ans1 = i, ans2 = i + 1;             } else if (i + 3 < n) {               d = v[i + 3];               if (d != a)                 ans1 = i + 2, ans2 = i + 3;               else                 ans1 = i + 1, ans2 = i + 2;             } else               continue;           } else if (a == b)             ans1 = i + 1, ans2 = i + 2;           else if (b == c)             ans1 = i, ans2 = i + 1;         }         printf( %d %d n , ans1 + 1, ans2 + 1);         return 0;       }     }     printf( -1 n );     return (0);   }   