← All problemsSign in

Minimum Segments

Aadar wants to draw $n$ squares with a side length of $1$ using segments of length $1$. These squares can share sides with each other. However, he need not waste time drawing all the segments. If he draws one segment, all the segments that are parallel to it, can be traced out using shadows. For example, in the figures given below, he only needs to draw the red lines For n=1, ![image](https:

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