Code=ing
2013年11月2日 星期六
Codeforces Round #209 (Div. 2) B - Permutation
#include<stdio.h>
int main(){
int n,k,i,j;
scanf("%d%d",&n,&k);
n*=2;
if(k==0){
printf("1");
for(i=2;i<=n;i++)
printf(" %d",i);
return 0;
}
printf("%d %d",n-k,n);
for(i=n-1;i>=1;i--){
if(i!=n-k) printf(" %d",i);
}puts("");
}
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言