cpp implementation of Combination Sum