Driver Code
public static void main ( String [ ] args ) { int N = 5 ; int K = 3 ; int [ ] [ ] [ ] dp = new int [ K + 1 ] [ N + 1 ] [ 2 ] ; for ( int i = 0 ; i < K + 1 ; i ++ ) { for ( int j = 0 ; j < N + 1 ; j ++ ) { for ( int k = 0 ; k < 2 ; k ++ ) dp [ i ] [ j ] [ k ] = - 1 ; } }