Ansh-d-man and The Alien Attack
CodeChefOpen on judge ↗
Problem Description Our Algorithmia city is attacked by some Aliens. Aliens are destroying buildings, so people of Algorithmia called Ansh-d-man their super hero. There are total n buildings in the city numbered from 1 to n and each building consist of Ai (1 ≤ i ≤ n) number of people. Superhero Ansh-d-man wants to rescue each and every person but there is a problem with his powers. He can rescue
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