Nuttela loves trees !
CodeChefOpen on judge ↗
Nuttela is stuck with a tree problem and wants you to solve this. Given a tree with $N$ nodes , $N-1$ edges and value $A$$i$ of every node. as either being a $0$ or a $1$ Do the following operations: - find the total number of set nodes below the $M$th, where the $M$th node lies in the path between the root node $1$ and $U$th node - swap the value of a particular node ( $0$ $→$ $1$ and vice ve
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