← All problemsSign in

Valentines Day

Today is Valentine's Day and Kabir and Tara have decided to celebrate it. Now, both of them are going to park to spend some quality time together. The city is in the form of a grid comprising of 0s and 1s where 1s denotes traffic signal at that position and 0s denote roads. They are already late, the location of home $(x1,y1)$ and park $(x2,y2)$ is given and they have to go such that there

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