Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- #include <vector>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- vector<char> v{a,b,c,d,e,f,g,h,i,j};
- do {
- for (auto i : v) {
- cout << i << " ";
- }
- cout << endl;
- } while (next_permutation(v.begin(), v.end())w);
- }
Add Comment
Please, Sign In to add comment