Email Cost
CodeChefOpen on judge ↗
Consider N students of IIT - Jodhpur. Each student i have information A[i] - a positive integer, stored which he/she needs to send. Every student i sends this information to student j such that i is a friend of j and the friendship is bidirectional. It is guaranteed that the path on this friendship network between any two students i and j is unique. Now every student i needs to send information 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.
Sign in to chat with the tutor and save your progress.
Sign in to start