
2014. Researchers find that reading the same row of DRAM over and over, fast enough, leaks charge into the rows physically next to it and flips their bits. No bug in any program, just physics winning against density. Someone then turns it into a privilege escalation from JavaScript in a browser tab. The row you hammer is fine. Its neighbours are the ones that change.
Objective
Count the charged cells in the rows immediately above and below the hammered row.
Steps
$ neighbours_at_risk({1,0,0, 0,1,1, 1,1,1, 0,0,1}, 3, 4, 1)
4
$ neighbours_at_risk({1,0,0, 0,1,1, 1,1,1, 0,0,1}, 3, 4, 0)
2
$ neighbours_at_risk({1,0,0, 0,1,1, 1,1,1, 0,0,1}, 3, 4, 3)
3
Expected files
Allowed functions
None. Write every helper yourself.
Loading solutions...