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