{
const d = 10;
const sz = 40;
const matrix = html`<div style='width: ${d * sz}px; height: ${
d * sz
}px; position: relative;'/>`;
const mcell = [];
const [ii, jj] = f(n);
for (let i = 0; i < d; ++i) {
let mrow = [];
for (let j = 0; j < d; ++j) {
const ty = ii == i && jj == j ? "pivotcell" : "normalcell";
let cell = html`<div class = 'matrixcell ${ty}' style='top: ${
sz * i
}px; left: ${sz * j}px;' ></div>`;
cell.appendChild(html`(${i},${j})`);
mrow.push(cell);
matrix.appendChild(cell);
}
mcell.push(mrow);
}
return matrix;
}