you give integer m n represent 0indexed m x n grid you give 2D integer array guard wall guardsi rowi coli wallsj rowj colj represent position ith guard jth wall respectivelyA guard cell cardinal direction north east south west starting position obstruct wall guard a cell guard guard itreturn number unoccupied cell guard Example 1input m 4 n 6 guard 001123 wall 012214output 7explanation the guard unguarded cell show red green respectively diagramthere total 7 unguarded cell return 7example 2Input m 3 n 3 guard 11 wall 01102112output 4explanation the unguarded cell show green diagramthere total 4 unguarded cell return 4 Constraints1 m n 1052 m n 1051 guardslength wallslength 5 1042 guardslength wallslength m nguardsilength wallsjlength 20 rowi rowj m0 coli colj nAll position guard wall unique