Guddu vs Munna
CodeChefOpen on judge ↗
Munna Bhaiya has killed Bablu (spolier alert! :p) and now Guddu Bhaiya wants revenge. Munna and Guddu both call their friends to fight against the other. Their friends further call their friends and so on. You are given $N$ people and $M$ friendships in Mirzapur. Each person in Mirzapur has a power denoted by the array $A$. Also, the friendships are commutative i.e. if $X$ is a friend of $Y$, $Y$
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