A function to answer queries of longest common extension
void LCEQueries ( string str , int n , Query q [ ] , int m ) { for ( int i = 0 ; i < m ; i ++ ) { int L = q [ i ] . L ; int R = q [ i ] . R ; printf ( " LCE ▁ ( % d , ▁ % d ) ▁ = ▁ % d STRNEWLINE " , L , R , LCE ( str , n , L , R ) ) ; } return ; }