Tree Colouring (Easy)
**This is the easy version of the general Tree Colouring task. You only need to find a valid colouring of the whole tree instead of checking if every prefix is colourable. This is only present in Divisions $2$, $3$ and $4$. This version is worth $50$ points.** You have a tree with $N$ nodes numbered $1$ to $N$. You want to assign each node a colour $C_i$ ($1 \le C_i \le N$) such that the follow
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