Files
2026-03-11 18:38:08 +05:30

52 lines
791 B
C++

//URL - https://cses.fi/problemset/task/1070/
//CSES
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define dbg(x) cerr << #x << " = " << x << endl
#else
#define dbg(x)
#endif
#define ll long long
#define ld long double
#define ar array
#define all(x) (x).begin(), (x).end()
#define sza(x) (int)(x).size()
const ll INF = 1e18;
const int MOD = 1e9 + 7;
void solve() {
int n;
cin>>n;
if(n==1) {
cout<<n;
return;
}
if(n<4){ cout<<"NO SOLUTION";
return;
}
for(int i =2;i<=n;i+=2)
cout<<i<<" ";
for(int i = 1;i<=n;i+=2){
cout<<i<<" ";
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int tc = 1;
// cin >> tc;
while(tc--) solve();
}