K - Tree Hail Conjecture
CodeChefOpen on judge ↗
For a tree $T$ with $n$ vertices, we define the $(3n+1)$ operation as follows: - Set $T_1$, $T_2$, and $T_3$ to be copies of $T$, rename the nodes of $T_2$ by adding $n$ to each original label, and then rename the nodes of $T_3$ by adding $2n$ to each original label. Then, replace $T$ with $T_1$, $T_2$, and $T_3$. - Add an edge $(u_1, v_1)$ where $1 \leq u_1 \leq n$, and $n+1 \leq v_1 \leq 2n$. Yo
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