Home | Problemset | Contests | Account

Serpents of Temptation

Author: mistertfy64

(The maximum score for this problem is 66666666 points.)

So it begins, your moments of damnation. Your time here probably wasn’t a fun time, filled with too much negativity in the fiery pits of the predicament, and it seems like this time, you have another task to do, commanded by the Devil, of course. This time, you are to be the Devil’s test subject on walking on the numbered tiles of pain, probably to get to the other side. You want to minimize the pain after walking over the numbered tiles, so you can’t just decide not to do it. So you do it anyway...

numbered-tiles-of-pain.png (24kB .png)

You start with 0 pain and in one operation, you move one tile forward. Once you reach a tile, you will apply that operation to your pain amount. For example, once you step on the first tile (the +1 tile), you now have 1 pain (because 0+1 is 1), and once you step on the next tile (the -3 tile, you now have -2 pain (because 1-3 is -2). Note that operations are applied sequentially (for this problem, ignore the order of operations, i.e., ignore e.g., PEMDAS for this problem).

In the route, there are also division tiles. Once stepped on the division tile, your pain amount is divided by the number, and then rounded down.

Before starting, you notice some serpents on some tiles. The serpents tempt you by letting you ride on it. You may choose to ride or not to ride on the serpent, upon riding a serpent, you do not apply a tile’s operation to your pain amount. If you arrive on a tile with a serpent, you apply the operation to your pain amount first, then choose to ride or not ride the serpent. If you choose to ride the serpent, you also apply the operation to your pain amount on the tile you get off. Note that serpents may only take you forward. The serpents’ routes are represented by green arrows. (Formally, if you arrive on a tile with the tail of a green arrow and choose to go through with the green arrow, you first apply the operation to your pain amount, then move to the tile with that green arrow’s head, then apply that operation to your pain amount as well.)

The correct password is the minimum pain amount you can achieve, making use of some (possibly all or none) of the serpent’s temptations.

If the minimum pain amount is a negative number, include the minus sign (-) in your answer as well, and do not include any number separators (e.g. commas and/or dots) in your answer.


Please log in to submit answers.

Correct Answers

No one has solved this problem yet! Will you be the first?