ACMIIITB2018P3
CodeChefOpen on judge ↗
In the city of Asgard, people have started rebelling against the king and are forming communities with there own believes and rule. Every group of community is trying to overpower each other. It all started with one person per community; later they started merging and forming bigger groups. For example, there are 5 people in the Asgard city: 1, 2, 3, 4, 5. Initially, nobody is connected to nobody
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