2013年6月26日

程设模拟考 G:拯救行动

摘要: 题目见此:http://cxsjsx.openjudge.cn/2013weekend/5G/解题思路:广搜守卫要走两步,需要特殊处理。我的处理方法是遇到守卫把,就在把这个点重新加入队列,下一次再取出,这样就保证了队列的优先性。也可以直接用优先队列。贴代码: 1 #include 2 #include 3 #include 4 using namespace std; 5 struct Point 6 { 7 int x, y, time; 8 bool stay; 9 Point():stay(0){}10 };11 Point p, ne;12 int r, ... 阅读全文

posted @ 2013-06-26 14:55 白~ 阅读(234) 评论(0) 推荐(0)

导航