#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ string s; cin>>s; int q; cin>>q; int x=s.length(); vector >a(x,vector(26,0)); for(int i=0;i>l>>k; l--,k--; for(int i=0;i<26;i++) { if(l==0) {m+=(a[k][i]/2); if(a[k][i]%2==1&&b) { m++; b=0; } } else {m+=(a[k][i]-a[l][i])/2; if((a[k][i]-a[l][i])%2==1&&b) { m++; b=0; } } } cout<