import assert from 'node:assert/strict'; const A=[[1,2],[3,4]],B=[[5,6],[7,8]],N=2,K=2; const fresh=()=>({a:null,b:null,acc:0,count:0}); let grid=Array.from({length:N},()=>Array.from({length:N},fresh)); const expected=[[[5,0],[0,0]],[[19,6],[15,0]], [[19,22],[43,18]],[[19,22],[43,50]]]; const token=(value,k)=>({value,k}); for(let t=0;tr.map(p=>({...p}))); for(let i=0;i=0&&ka=0&&kbr.map(p=>p.acc)),expected[t]); } assert.deepEqual(grid.map(r=>r.map(p=>p.count)),[[2,2],[2,2]]); console.log('Schedule lab passed');