← All problemsSign in

Heroes of Magical Might

CodeChefRating 2196Open on judge ↗

You are playing the game Heroes of Magical Might. Your hero is in a grid map divided into MxN squares. There are three kinds of possible objects in each square: - Obstacles: these can be trees, mountains, houses, and so on. Your hero cannot walk into these squares. These squares are represented by the characters '#'. - Treasures: your hero can find some gold or earn experience points when colle

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start