摘要: 简单。手动的实现全排列 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn = 24; 7 8 struct node{ 9 char a,b,aa; 10 int c,d,val; 11 }p[ 5 ],temp; 12 13 struct node2{ 14 node tt[5]; 15 int most; 16 }ans[ 122 ]; 17 18 int cmp( node a,node b ){ 19 re... 阅读全文
posted @ 2013-07-13 17:41 xxx0624 阅读(522) 评论(1) 推荐(0) 编辑
摘要: 模拟BFS搜索对于一个将要爆炸的点,可能同时由多个点引起。 1 /* 2 模拟搜索过程 3 */ 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 const int maxn = 8;11 int mat[ maxn ][ maxn ];12 int mytime[ maxn ][ maxn ];13 const int dx[] = {0,0,-1,1};14 const int dy[] = {1,-1,0,0};15 struct node{16 int x,y,ti,... 阅读全文
posted @ 2013-07-13 15:20 xxx0624 阅读(184) 评论(0) 推荐(0) 编辑