Counting Hexagons
Dexter wants to make a hexagon by using six sticks for sides from a collection of sticks of lengths 1, 2, 3, ... N. Dexter will only make valid hexagons whose area is strictly positive. He considers a hexagon "good" if the biggest stick has length at least L and lengths of all the other sticks are not more than X. A "good" hexagon does not have sticks of the same length more than K times. How
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