Another implementation for combination sum problem for new online judge.