/* -*- coding: utf-8 -*- * * 2609.cc: No.2609 Decreasing GCDs - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 100; /* typedef */ /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); int msk = (1 << n) - 1; for (int i = n - 1, bi = 1; i >= 0; i--, bi <<= 1) { as[i] = msk; msk ^= bi; } for (int i = 0; i < n; i++) printf("%d%c", as[i], (i + 1 < n) ? ' ' : '\n'); return 0; }