Tree Operations (Easy)
**This is the easy version of the problem. The only difference is that here, $Q = 1$. This version is worth $100$ points in all Divisions.** You are given a tree with $N$ nodes, rooted at $1$. Each node $i$ has an associated non-negative integer value $A_i$. The **score of a tree** is defined as the minimum number of times you need to apply the following operation to reduce all $A_i$ to $0$: -
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