Java program to find if it is possible to cross the matrix with given power
class GFG { static final int N = 105 ; static final int R = 3 ; static final int C = 4 ; static int maximumValue ( int n , int m , int p , int grid [ ] [ ] ) { boolean dp [ ] [ ] [ ] = new boolean [ N ] [ N ] [ N ] ; int i , j , k ;