100 Day Summer Challenge

100 problems in 100 days. #100problems

Day 79

79 of 100: Guards in the Gallery

The purple figure below is the floor plan of a gallery, and an example is shown of what could be seen by a single guard who cannot see through walls but who can look \( 360^\circ \) around.

Your job is to position some number of guards in the gallery such that every location in this gallery is in view of at least one of the guards.

What is the fewest number of guards that you can use to guard the entire gallery?

Make sure every nook and cranny is visible to at least one guard! You can assume any sub-region of the gallery that appears to be a rectangle is, in fact, a rectangle.

×

Problem Loading...

Note Loading...

Set Loading...