Rectangles
CodeChefOpen on judge ↗
Alice has stuck a huge rectangular white sheet on a board. The sheet has length 5000cm and width 5000cm. She gives Bob 4 integers: l1, w1, l2, and w2. Bob should draw two rectagles, R1 and R2 on the sheet, such that all the sides of both the rectangles are parallel to some side of the white sheet. Also, R1 should have length l1 and width w1, and R2 should have length l2 and width w2. He may draw t
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.
Sign in to chat with the tutor and save your progress.
Sign in to start