# [Community Puzzle] A Man with a Plan

https://www.codingame.com/training/hard/a-man-with-a-plan

Created by @anon72424297,validated by @VirtualAtom,@Stilgart and @tutubalin.
If you have any issues, feel free to ping them.

The River? From Bruce Springsteen (album: The River).
To Hell and Back? From Venom (album: Black Metal).
Carry on? From JJ Cale (album: Shades).

Good exercice but itâ€™s not precised if points of interest coordinates are given in (row, col) or (col, row). Finally itâ€™s (col, row) but its add confusing when you try to solve amost with symetrical first tests.

Thanks for your feedback. In fact the coordinates order is precised in the â€śinputsâ€ť section:

2 Likes

This is one of those few tasks that will be in my mind for a long time. Great story, very useful puzzle and much more interesting than another BFS-like puzzle

Thank you so much for creating this gem!

2 Likes

1 Like

I love this puzzle, not so classic. Thanks for your work
iâ€™m a bit frustrated because my test cases are all OK but the 2nd validation case is red.
It must not be the most complicated but without information about the map in this case, i donâ€™t know how to improve my code.

Hey ! Thank you for your feedback. I sent you a message with the validator values.

Thanks ! I now understand whatâ€™s wrong

What am I sapposed to take away from the constraints detail â€śThe wizard uses Manhattan distance.â€ť? I googled Manhattan distance, thatâ€™s fine. But does this detail mean it takes you the result of a manhattan distance when the wizard teleports you to the nearest point of interest? or what part of the puzzle uses Manhattan distance when concerning the wizard?

The wizard teleports you to the nearest point of interest - considering Manhattan distance, which is abs(delta_x) + abs(delta_y).

2 Likes

It is not very clear if you can cross a river or not after buying an armor or if you just lose your speed boost (as stated: or to cross a water point without your armor rusting). So buying an armor means you canâ€™t go on any water cases for the rest of the game ?

The sentence just after the one you quote: â€śAnd itâ€™s absolutely out of question to abandon them once purchased.â€ť. So no, if you buy an armor you donâ€™t cross water anymore.

@anon72424297 , love the puzzle. I am just on the 2nd test case and have learned a ton from doing this puzzle. But i have a question for you. When you go through a quest location, (princess, treasure, or dragon), does the armour and the horse both reduce the time those locations take in a compound effect? ei. if you have both it takes 1 day but if you have one of them it takes 2 days? or is only the armour effective at those locations?

1 Like

Only the armor is effective on the quest locations, since youâ€™re not traveling but only fighting bunches of enemies at the same place during four days (Or two with the armor). ^^

1 Like

Hey, @anon72424297! I need some tips with the â€śTo Hell and Backâ€ť test case. My solution is 34 days and i cant find the way in 31 days. What is the rigth sequnce? Or where is my mistake?
h-g-stable-g-g-dragon-s-s-s-TREASURE-s-s-s-dragon-g-castle
2 1 1 1 4 3 3 3 4 3 3 3 1 1 1

TREASURE
ISSSS
RRIRR
RGGGR
GGGGI
IGIIG
HOUSE05
CASTLE44
STABLE25
BLACKSMITH35
DRAGON22
TREASURE00

and me pls! Whats wrong with the â€śHall of the Mountain Kingâ€ť? Oo

Hey! Arenâ€™t you forgetting that poor blacksmith?

1 Like