func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<long long> adj[100005];   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     bool flag = true;     int test_case = 1, tc;     if (!flag) cin >> test_case;     tc = test_case;     while (tc--) {       int i, j, n, m, sum = 0, ans = 0, cnt = 0, flag = 0;       int maxi = -1e9, mini = 1e9;       string s;       cin >> s;       cin >> n;       m = s.size();       int pre[26][m + 2];       memset(pre, 0, sizeof(pre));       for (i = 0; i < m; i++) pre[s[i] -  a ][i] = 1;       for (i = 0; i < 26; i++) {         for (j = 1; j < m; j++) {           pre[i][j] += pre[i][j - 1];         }       }       while (n--) {         int l, r;         cin >> l >> r;         cnt = 0;         if (r == l) {           cout <<  Yes n ;           continue;         } else if (l == 1) {           for (i = 0; i < 26; i++) {             if (pre[i][r - 1] > 0) cnt++;           }         } else {           for (i = 0; i < 26; i++) {             if (pre[i][r - 1] - pre[i][l - 2] > 0) cnt++;           }         }         if (cnt > 2 or s[l - 1] != s[r - 1])           cout <<  Yes n ;         else           cout <<  No n ;       }     }     return 0;   }   