[Codeforces Round #144 (Div. 2)]A. Perfect Permutation

地址:http://codeforces.com/contest/233/problem/A

这题好像做过,接下来几天要做点有难度的题

 1 #include<stdio.h>
 2 
 3 int n;
 4 
 5 int main()
 6 {
 7     int i;
 8     scanf("%d",&n);
 9     if(n%2==0)
10     {
11         for(i=1;i<=n;i=i+2)
12             printf("%d %d ",i+1,i);
13     }
14     else printf("-1\n");
15     return 0;
16 }

 

posted @ 2013-01-21 22:50  tjsuhst  阅读(156)  评论(0)    收藏  举报