Store matrix elements such that sum of elements in both diagonals of every 2 * 2 submatrices is even
let mat = new Array ( N + 1 ) ; for ( var i = 0 ; i < mat . length ; i ++ ) { mat [ i ] = new Array ( 2 ) ; }