Surgical strike problem

What algorithm use to solve this problem