摘要:
1 #include<cstdio> 2 #include<cstring> 3 #include<cstdlib> 4 const int maxn = 6; 5 int table[maxn][maxn]; 6 int hash_col[maxn][maxn], hash_row[maxn][maxn], hash_gro[maxn][maxn]; 7 int gro_id[maxn][maxn]; 8 int cas = 0; 9 void next_pos(int& r, int& c)10 {11 if(5 == c)//这里写成了 阅读全文
摘要:
1 #include<stdio.h> 2 void move(char a,char b) 3 { 4 printf("%c->%c\n",a,b); 5 } 6 void han(int n,char a,char b,char c) 7 { 8 if(n>0) 9 {10 han(n-1,a,c,b);11 move(a,b);12 han(n-1,c,b,a);13 }14 }15 int main()16 {17 int n;18 scanf("%d",&n);19 printf... 阅读全文