Lang:G++
Edit1234567891011121314151617181920212223#include<bits/stdc++.h>#define DEBUG {freopen("test.in","r",stdin);freopen("test.out","w",stdout);}#define INPUT {cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);}#define mst(a,X) memset(a,X,sizeof(a))#define INF 0x3f3f3f3f#define PI acos(-1.0)using namespace std;const int maxn = 1e5 + 20;int ary[maxn];int main() {int n;cin >> n;for(int i = 1, k = 1; i <= n; ++i) {ary[k] = i;if(k != n-k+1) ary[n-k+1] = ++i;k++;}for(int i = 1; i < n; ++i)cout << ary[i] << ' ';cout << ary[n] << endl;return 0;}