Christmas Tree
CodeChefOpen on judge ↗
On the Occasion of Christmas Alan decided to decorate his tree with light bulbs. So starting from the top he connected $N$ light bulbs of different colors randomly on the tree with $N-1$ wires such that each light bulb is connected to every other bulb in the tree. A light bulb can have any color $C$ from $1$ to $1000$, where each positive integer denotes a unique color. Once he was done with deco
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