← All problemsSign in

Arya and the Grid of Stars

CodeChefRating 2601Open on judge ↗

Arya is planning to go back to Winterfell. In order to reach there and survive, she must collect maximum stars from a maze. The maze is in the form of a grid of size $m \times n$. Each cell is either blank, has a star or has a stone. She starts from $(1,1)$ to reach $(m, n)$ using right and bottom moves and then she returns to $(1, 1)$ using top and left moves. The only constraint is that i

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