牛客网刷题
牛客网刷题
h.x.z
加油
展开
-
组合之和 -- 牛客网
class Solution {public: vector<vector<int>> res; void getAns(vector<int> &num, vector<int> &path, int curSum, const int& target){ if(curSum > target) return; if(curSum == target){ .原创 2020-09-18 09:33:38 · 216 阅读 · 0 评论 -
加起来和为目标值的组合 -- 牛客网
class Solution {public: vector<vector<int>> res; /* * 判断某个值是否在search集合中 */ bool contains(vector<int> &search, int& n){ for(int i=0;i<search.size();i++){ if(search[i] == n){ .原创 2020-09-18 09:31:54 · 589 阅读 · 0 评论