SuperFriends
CodeChefOpen on judge ↗
Problem description. Each Justice Leaguer has some power, a number representing his strength. Every member can call some other members for help. The call for help can be cascaded. For example, x can call y and then, y can call z. The reach of a member is defined as the sum of the powers of all the members that can be called to help. Given the list of which members can call which members to help,
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