摘要: 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... 阅读全文
posted @ 2014-03-17 21:10 卖程序的小歪 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 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(... 阅读全文
posted @ 2014-03-17 19:54 卖程序的小歪 阅读(193) 评论(0) 推荐(0) 编辑