AREA
CodeChefOpen on judge ↗
There are several sticks each 1 inch long. Your job is to form a rectangle with the biggest possible area, using these sticks as the perimeter. You can glue sticks together, but you are not allowed to break a single stick into multiple shorter sticks. For example, if there are 11 sticks, you can create a 2 x 3 rectangle using 10 sticks. This rectangle has an area of 6 square inches, which is the b
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