摘要: 题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26772思路:注意判重就行,开个6维数组记录3个robots的位置,然后要注意的就是不能多个robots同时在一个格子上,一开始没注意到这点! 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 #define MAXN 11 8 9 struct Point{10 int x,y;11 };12 13 struct Node{14 Poi... 阅读全文
posted @ 2013-09-27 17:19 ihge2k 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26766思路:由于数据不是很大,我们可以枚举骑士最后聚集的位置,然后枚举的时候用bfs搜索即可。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define MAXN 14 9 10 struct Node{11 int x,y,step;12 Node(){}13 Node(int _x,int _y,... 阅读全文
posted @ 2013-09-27 15:07 ihge2k 阅读(171) 评论(0) 推荐(0) 编辑