摘要: 分析:广搜,每个四位数作为一个状态,从每个状态扩展出其他的几种状态并累加步数之后加入队列。 1 #include <stdio.h> 2 #include <string.h> 3 #include <algorithm> 4 using namespace std; 5 6 int vis[10][10][10][10]; //标记数组 7 8 struct node 9 { 10 int step; 11 int num[4]; 12 }q[8000], tt, in, st, end; 13 int front,rear; 14 15 bool ... 阅读全文
posted @ 2013-03-04 19:36 尔滨之夏 阅读(344) 评论(0) 推荐(0) 编辑