```
def combinationSum(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
a= sorted(candidates)
l = len(a)
result = []
def dfs(remain, ans, index):
if remain == 0 :
result.append(ans)
return
for i in xrange(index,l):
if a[i] > remain: break
dfs(remain - a[i], ans+[a[i]], i)
dfs(target, [], 0)
return result
```