For the Benefit of All (easy version)
CodeChefOpen on judge ↗
The only difference between easy and hard versions is the constraints. In the new secret NASA, there are $n$ astronauts. Professor Brand wants to form a team headed by Dr Mann for the Lazarus mission. Astronauts will team up in pairs for the mission. But there is one condition: two astronauts will team up with one another if and only if each person believes that the other person is good enough
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