Parity tree
You are given a tree consisting of n nodes numbered from 1 to n. The weights of edges of the tree can be any binary integer satisfying following Q conditions. - Each condition is of form u, v, x where u, v are nodes of the tree and x is a binary number. For satisfying this condition, sum of the weight of all the edges present in the path from node u to v of the tree, should have even if x = 0, od
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