회사가 그지같은 맥북이라서 js로 풀어봄
function solution() {
const front = [2, 0, 3, 1];
const side = [1, 1, 2, 3];
const matrix = Array.from(Array(4), () => Array(4).fill(0));
for (let i = 0; i < 4; ++i) {
for (let j = 0; j < 4; ++j) {
matrix[j][i] = front[i];
}
}
let idx = 0;
for (let i = 3; i >= 0; --i) {
for (let j = 0; j < 4; ++j) {
if (matrix[i][j] > side[idx]) matrix[i][j] = side[idx];
}
idx++;
}
console.log(1);
}
solution();