public void tryNext(ArrayList<ArrayList<Integer>> res, int[] num, int level, int target, int[] has, int pos, int total) {
        if(total > target) return;
        else if(total == target) {
            ArrayList<Integer> list = new ArrayList<Integer>();
            for(int i = 0; i < pos; i++) list.add(has[i]);
            res.add(list);
            return;
        } else {
            if(level == num.length) return;
            tryNext(res, num, level+1, target, has, pos, total);
            while(pos < has.length && total < target) {
                has[pos++] = num[level];
                total += num[level];
                tryNext(res, num, level+1, target, has, pos, total);
            }
        }
    }