public void dfs(int[] candidates, int begin, List<List<Integer>> result,
			List<Integer> temp, int sum, int target) {
		if (sum > target)
			return;
		if (sum == target) {
			result.add(new ArrayList<Integer>(temp));
			return;
		}
		for (int i = begin; i < candidates.length; ++i) {
			int num = candidates[i];
			if (sum + num > target)
				break;
			temp.add(num);
			dfs(candidates, i + 1, result, temp, sum + num, target);
			temp.remove(temp.size() - 1);
			while (i < candidates.length - 1
					&& candidates[i] == candidates[i + 1]) {
				++i;
			}
		}
	}