func_code_string: #include <bits/stdc++.h>   using namespace std;   int cnt[27][200010];   int main() {     string s;     int q, i, j, l, r, c;     cin >> s >> q;     memset(cnt, 0, sizeof(cnt));     for (i = 0; i < s.length(); i++) {       c = s[i] -  a ;       cnt[c][i + 1]++;       for (j = 0; j < 26; j++) cnt[j][i + 1] += cnt[j][i];     }     for (; q > 0; q--) {       scanf( %d%d , &l, &r);       if (l == r)         cout <<  Yes  << endl;       else {         if (s[l - 1] != s[r - 1])           cout <<  Yes  << endl;         else {           int sum = 0;           for (i = 0; i < 26; i++) {             if (cnt[i][r] - cnt[i][l - 1] >= 1) sum++;             if (sum == 3) break;           }           if (sum == 3)             cout <<  Yes  << endl;           else             cout <<  No  << endl;         }       }     }     return 0;   }   