Function to find weight of LCS
int lcs ( int dp [ 101 ] [ 101 ] , string a , string b , int m , int n ) { for ( int i = 0 ; i < 100 ; i ++ ) for ( int j = 0 ; j < 100 ; j ++ ) dp [ i ] [ j ] = -1 ; if ( m < 0 n < 0 ) { return 0 ; }