#include using namespace std; #define rep(i,x) for(int i=0;i> n >> k; int arr[] = {1, 0, 2, -1, 0, -2}; int base = 100; // base+1, base, base+2, base-1, base, base-2, base+1, base int idx; rep(i, n-k-2+2) { if (i) cout << ' '; cout << base+arr[i%6]; idx = i%6; } rep(i, n-(n-k)) { cout << ' ' << base+arr[idx]; } cout << endl; }