摘要:
class Solution {public: vector > combinationSum2(vector &num, int target) { sort(num.begin(), num.end()); vector > tmp; vector sel; dfs(num, 0, target, sel, tmp); return tmp; } void dfs(vector &num, int pos, int target, vector& sel, vector >& r... 阅读全文
摘要:
class Solution {public: vector > combinationSum(vector &candidates, int target) { sort(candidates.begin(), candidates.end()); candidates.erase(unique(candidates.begin(), candidates.end()), candidates.end()); vector > tmp; vector sel; dfs(... 阅读全文