Skip to content

cursethedarkness

bradendubois edited this page Nov 24, 2021 · 9 revisions

Curse the Darkness

ID: cursethedarkness

Difficulty: 2.3

CPU Time: 1 second

Memory: 1024 MB

Solution

For each case, simply store the X, Y of the book, and for each candle, we want to see it is within 8 metres. Check the hypotenuse from the candle to the book (absolute value of X-x, absolute value of Y-y, summed and square-rooted) and if it's within 8 metres, mark some sort of "success" boolean for this case.

Clone this wiki locally