← All problemsSign in

XOR CIRCUIT

There are $N$ nodes in a circuit. The first $N-1$ nodes are connected in the form of a rooted tree with root $1$. All the leaf nodes of the rooted tree are then connected with node $N$.For each $N$ nodes, you are allowed to select a value among 1,2,3 and 0. You need to calculate the number of possible ways of assigning values to N nodes such that for all the paths from node $1$ to node $N$ have a

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start