Mars Challenge
CodeChefOpen on judge ↗
$N$ aliens have landed on Earth from the planet Mars. Tom and Jerry together have to save the people on Earth from those Aliens. Tom and Jerry decide to fire cheese balls on the group of aliens. If one of the aliens is hit by the cheese ball, it causes damage to the neighbouring ones also i.e., if $i^{th}$ alien is hit it causes damage to $(i-1)^{th}$ and $(i+1)^{th}$ alien as well. The damage ca
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