CF -- 414A

 1 #include<iostream>
 2 #include<cstdio>
 3 #include<cstring>
 4 using namespace std;
 5 int main(){
 6     int n,k;
 7     while(~scanf("%d%d",&n,&k)){
 8         if(n == 1 &&  k > 0 || k < n / 2) printf("-1\n");
 9         else if(n == 1 && k == 0) printf("1\n");
10         else{
11             if(k == n/2){
12                 for(int i = 1;i < n;i ++) printf("%d ",i);
13                 printf("%d\n",n);
14             }else{
15                 int tmp = k - n/2 + 1;
16                 printf("%d %d",tmp,2*tmp);
17                 for(int i = tmp*2 + 1;i < tmp *2 + n - 1;i ++) printf(" %d",i);
18                 printf("\n");
19             }
20         }
21     }
22     return 0;
23 }

 

posted on 2014-04-18 14:57  ~Love()  阅读(89)  评论(0编辑  收藏  举报

导航