CivilWar
CodeChefOpen on judge ↗
Problem Statement: Captain America and Iron Man are at WAR and the rage inside Iron Man is rising. But Iron Man faces a problem to identify the location of Captain America. There are N buildings situtaed adjacently to each other and Captain America can be at any building. Iron Man has to arrange the Buildings from 1 to N is such a way that Value(i.e abs(Building Number -Position of Building))
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