#include using namespace std; // A utility function to print a substring str[low..high] void printSubStr( string s, int low, int high ) { cout<>l>>r; int n=r-l+1; while(l maxLength) { start = i; maxLength = k; } } } } // printf("Longest palindrome substring is: "); //printSubStr( str, start, start + maxLength - 1 ); return maxLength; // return length of LPS } // Driver program to test above functions int main() { int t; string s; cin>>s>>t; while(t--){ cout<< longestPalSubstr( s ) <