Pagini recente » Cod sursa (job #1336213) | Cod sursa (job #2835186) | Cod sursa (job #1275411) | Cod sursa (job #1512836) | Cod sursa (job #1414339)
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fs first
#define sc second
#define pob pop_back
#define pub push_back
#define eps 1E-7
#define sz(a) a.size()
#define count_one __builtin_popcount;
#define count_onell __builtin_popcountll;
#define fastIO ios_base::sync_with_stdio(false)
#define PI (acos(-1.0))
#define linf (1LL<<62)//>4e18
#define inf (0x7f7f7f7f)//>2e9
#ifndef ONLINE_JUDGE
ifstream fin("permutari.in");
ofstream fout("permutari.out");
#endif
const int MAXN = 100;
void read() {
int n;
vector<int> sol;
fin >> n;
for(int i = 1; i <= n; ++i)
sol.pub(i);
do {
for(auto it : sol)
fout << it << " ";
fout << "\n";
} while(next_permutation(sol.begin(), sol.end()));
}
int main() {
read();
return 0;
}