A rectangular room of size N x M is divided into 1 x 1 unit cells. . is an empty cell, # is a wall that blocks light, and * is a light source. There is exactly one light source, treated as a point at the center of the * cell.
For a point in an empty cell, light reaches that point if the line segment from the light source to the point does not intersect the interior of any wall cell. Empty space that light cannot reach is shadow. Wall cells block light, but their own area is not included in the area to output.
Given the room, compute the area of empty space that is in shadow.