class Solution {
vector> result;
public:
void dfs(vector &tmp, int level, int n, int k){
if(level > n){
if(tmp.size() == k){
result.push_back(tmp);
}
return;
}
dfs(tmp, level+1, n, k);
tmp.push_back(level);
dfs(tmp, level+1, n, k);
tmp.pop_back();
}
vector > combine(int n, int k) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
result.clear();
vector tmp;
dfs(tmp, 1, n, k);
return result;
}
};