zoukankan      html  css  js  c++  java
  • 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
    ");
     9         else if(n == 1 && k == 0) printf("1
    ");
    10         else{
    11             if(k == n/2){
    12                 for(int i = 1;i < n;i ++) printf("%d ",i);
    13                 printf("%d
    ",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("
    ");
    19             }
    20         }
    21     }
    22     return 0;
    23 }
  • 相关阅读:
    数据结构 1
    MyBatis 7
    MyBatis 6
    MyBatis 5
    MaBatis 4
    MyBatis 3
    目录和文件管理
    Linux常用命令精讲
    Sentos7.4安装说明
    RIP
  • 原文地址:https://www.cnblogs.com/anhuizhiye/p/3673262.html
Copyright © 2011-2022 走看看