check top - right cell
if ( ( elex > 0 ) && ( eley < n - 1 ) && ( rect [ elex - 1 ] [ eley + 1 ] == 0 ) ) { rect [ elex - 1 ] [ eley + 1 ] = 1 ; vector < int > v = { elex - 1 , eley + 1 } ; qu . push_back ( v ) ; }