https://leetcode.com/problems/permutation-sequence/
class Solution {
public:
string getPermutation(int n, int k) {
vector<int> res;
string s;
int num=1;
for(int i=1; i<=n;i++){
res.push_back(i);
}
do{
if(num==k) break;
num+=1;
}while (next_permutation(res.begin(), res.end()));
for(int i=0;i<res.size();i++){
s.push_back(res[i]+'0');
}
return s;
}
};