Órbita bajaFlood fillAbierto el 4 dic, 00:00

Día 4: Chimney Hopper

Orimovo's habitat deck is a square grid of rooftops, and an elf has to visit as many chimneys as possible before the airlock cycles. Your input is a grid of digits; each digit is a roof's height from 0 to 9. The elf starts on the roof in the top-left corner.

From a roof the elf can hop to the roof directly up, down, left or right of it, as long as that roof is at most 1 higher. Dropping down any distance is fine. For example:

0128
1239
5541
9970

From the top-left 0 the elf can climb step by step to the 4 and both 5s, and drop to the 1 and 0 on the right. Only the 8, the two 9s on the left, the 9 on the right and the 7 are out of reach, so the elf can reach 11 roofs, counting the start.

How many roofs can the elf reach, including the start?

Ver el ejemplo resuelto

Paso 8 de 8
0128123955419970
reached
11
Nothing else is in reach: the elf can get to 11 roofs.