[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 }

浙公网安备 33010602011771号