Driver Code
static void Main ( ) { for ( int i = 0 ; i < LG ; i ++ ) { for ( int j = 0 ; j < N ; j ++ ) { dp [ i , j ] = 0 ; mx [ i , j ] = 0 ; } } for ( int i = 0 ; i < N ; i ++ ) { v . Add ( new List < Tuple < int , int > > ( ) ) ; }