{"ScriptPreparationCode":null,"TestCases":[{"Name":"my","Code":"function my(m) {\r\n if (m.length === 1) return m[0][0];\r\n \r\n if (m[0].length === 2) return m[0][0] * m[1][1] - m[1][0] * m[0][1];\r\n\r\n let result = 0;\r\n const [firstRow, ...rest] = m;\r\n\r\n for (let i = 0; i \u003C firstRow.length; i\u002B\u002B) {\r\n let sign = i % 2 ? -1 : 1;\r\n const minorMatrix = rest.map((item) =\u003E item.filter((_, idx) =\u003E idx !== i));\r\n\r\n result \u002B= sign * (firstRow[i] * my(minorMatrix));\r\n }\r\n return result;\r\n}\r\nconst m1 = [[1, 2, 3], [8, 7, 6], [5, 4, 3]]\r\nmy(m1)","IsDeferred":false},{"Name":"not","Code":"function not(m) {\r\n if (m.length == 0) return 0;\r\n if (m.length == 1) return m[0][0];\r\n if (m.length == 2) return m[0][0] * m[1][1] - m[0][1] * m[1][0];\r\n if (m.length \u003E 2) {\r\n return m.reduce((prev, curr, i, arr) =\u003E {\r\n let miniArr = arr.slice(0, i).concat(arr.slice(i \u002B 1)).map(item =\u003E item.slice(1));\r\n return prev \u002B (i % 2 == 0 ? 1 : -1 ) * curr[0] * not(miniArr);\r\n }, 0);\r\n }\r\n};\r\nconst m1 = [[1, 2, 3], [8, 7, 6], [5, 4, 3]]\r\nnot(m1)","IsDeferred":false}]}