Solution
1070-Permutations.cpp
1#include<bits/stdc++.h>
2using namespace std;
3#define int long long
4signed main(){
5 ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
6 int n; cin>>n;
7 if(n==2||n==3) cout<<"NO SOLUTION\n";
8 else{
9 for(int i=2;i<=n;i+=2) cout<<i<<" ";
10 for(int i=1;i<=n;i+=2) cout<<i<<" ";
11 cout<<'\n';
12 }
13 return 0;
14}Editorial not yet generated for this problem. Run the editorial generation script to add hints and detailed explanations.