标签:des style blog http io ar os sp for
#include<cstdio> #include<cstring> #include<string> #include<iostream> #include<cmath> #include<cstdlib> #include<algorithm> using namespace std; int n,k; int main() { while(scanf("%d%d",&n,&k)!=EOF) { int temp; temp=n-k; for(int i=1;i<=temp;i++) printf("%d ",i); temp++; while(temp<=n) { printf("%d ",n); n--; if(temp<=n) printf("%d ",temp),temp++; else break; } } return 0; }
标签:des style blog http io ar os sp for
原文地址:http://www.cnblogs.com/a972290869/p/4101095.html