func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     string s;     cin >> s;     int n = (int)s.size();     vector<vector<int>> a(26, vector<int>(n + 1));     for (int i = 1; i < n + 1; ++i) {       a[s[i - 1] -  a ][i] += 1;     }     for (int i = 0; i < 26; ++i) {       for (int j = 1; j < n + 1; ++j) {         a[i][j] += a[i][j - 1];       }     }     int q;     cin >> q;     while (q--) {       int l, r;       cin >> l >> r;       if (l == r) {         cout <<  Yes  <<   n ;         continue;       }       int cnt = 0;       for (int i = 0; i < 26; ++i) {         cnt += !!(a[i][r] - a[i][l - 1]);       }       if (cnt == 1) {         cout <<  No  <<   n ;         continue;       }       if (cnt == 2) {         cout << (s[l - 1] == s[r - 1] ?  No  :  Yes ) <<   n ;         continue;       }       cout <<  Yes  <<   n ;     }     return 0;   }   