← All problemsSign in

Anjali and her fat cat

Anjali's cat is getting fat day by day so she needs to consult a vet doctor but she is on a low budget so needs take every step carefully. Initially, she is at the position 0,0 with $A$ units in her hand. The vet is at the position $M,N$. She needs to travel to that point in the shortest path possible as every step cost her $P$ units. The vet charges $D$ units per visit. Your task is to tell Anja

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