I am talking about people when its 100% sure they did that. Like caught on video etc not everyone who is sentenced with murder. People who confess without any "torture" or bad treatment due to cops and with 100% evidence second time offenders and so on. And yes it is ok in my opinion to kill innocent people for the greater good. For example in War against certain regimes many innocent people die but they die for the greater good of something. You can try to prevent and not to kill as many innocent people as possible but 0% would be impossible.
Innocent people confess to crimes more often than you might think video can lie and be manipulated evidence can be forgery, and it is never ok to kill but sometimes it is necessary but very rarely. War is never a good excuse to butcher the innocent.