Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void rec(string now, vector<int> have){
- if(have.size() == 0){
- cout << now;
- return;
- }
- for(int i = 0; i <= 'z' - 'a'; i++){
- if(have[i] > 0){
- have[i]--;
- rec(now + (char)('a'+i), have);
- have[i]++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement