← All problemsSign in

Connect The Dots! - 2

Alan has come up with another interesting puzzle for you. There are $N*M$ dots arranged in the form of a grid of $N$ rows and $M$ columns. You will be given a coordinate $(A,B)$. $A$ denotes the number of row. $B$ denotes the number of column. You are supposed to connect the dot at that coordinate to the dots **in the next row** which have a Manhattan Distance of less than or equal to $K$. (Manh

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