2012年8月3日
摘要: 应该算蛮简单的题,不需要什么优化搜索,可是居然想了我很久…………下面贴代码,作纪念。View Code 1 /*{ 2 ID:jzy3209981 3 PROG:maze1 4 LANG:C++ 5 }*/ 6 #include<stdio.h> 7 #include<iostream> 8 #include<string.h> 9 #include<math.h> 10 using namespace std; 11 12 int door[4]; 13 int doorstate[100][138][2]; 14 bool state[100 阅读全文
posted @ 2012-08-03 20:35 醉春雨 阅读(161) 评论(0) 推荐(0)
摘要: 研究了几天最短路径,果然对图论还是很难有兴趣啊!第一次写迪杰斯特拉算法,写的超级烂,有空改改再优化下,好好想清楚细节方面……下面贴出代码以作纪念。View Code 1 /*{ 2 ID:jzy3209981 3 PROG:comehome 4 LANG:C++ 5 }*/ 6 #include<stdio.h> 7 #include<iostream> 8 #include<string.h> 9 #include<math.h>10 using namespace std;11 12 int shortest[60];13 int dista 阅读全文
posted @ 2012-08-03 10:36 醉春雨 阅读(195) 评论(0) 推荐(0)