Make Array Elements Equal to Zero
Try each zero as a start and direction, bounce off nonzero cells, and count the choices that leave all zeros.
Try each zero as a start and direction, bounce off nonzero cells, and count the choices that leave all zeros.