Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <queue>
- #include <cstring>
- #include <map>
- #include <fstream>
- using namespace std;
- typedef long long ll;
- const int maxn = 1e6 + 2;
- int main() {
- ios_base::sync_with_stdio(false);
- vector<int> v(4);
- for(int i = 0; i < 4; i++) {
- v[i] = i + 1;
- }
- do {
- for(int i = 0; i < 4; i++) {
- cout << v[i] << " " ;
- }
- cout << endl;
- } while(next_permutation(v.begin(), v.end()));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement