you give integer n you n x n binary grid grid value initially 1s index give array mine the ith element array mine define minesi xi yi gridxiyi 0Return order large axisaligned plus sign 1s contain grid if return 0an axisaligned plus sign 1s order k center gridrc 1 arm length k 1 go leave right 1s note 0s 1s arm plus sign relevant area plus sign check 1s Example 1input n 5 mine 42output 2explanation in grid large plus sign order 2 one shownexample 2input n 1 mine 00output 0explanation there plus sign return 0 Constraints1 n 5001 mineslength 50000 xi yi nAll pair xi yi unique