I have a problem of Output Limit Exceeded, I checked code several times but can't find where is wrong. May anyone kindly told me where is wrong?

Thank you.

```
class Solution {
public:
void dfs(int now, int n, int k, vector<int> &tmp, vector<vector<int> > &r) {
if (k == 0) {
r.push_back(tmp);
return;
}
for (int i = now; i <= n - k; ++i) {
tmp.push_back(i + 1);
dfs(now + 1, n, k - 1, tmp, r);
tmp.pop_back();
}
}
vector<vector<int> > combine(int n, int k) {
vector<vector<int> > r;
vector<int> tmp;
dfs(0, n, k, tmp, r);
return r;
}
};
```