摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct Position //定义坐标结构 7 { 8 int row, col; 9 }; 10 class Maze 11 { 12 public: 13 void ReadTxt(); ... 阅读全文
posted @ 2016-03-18 14:51 隅子酱 阅读(557) 评论(0) 推荐(0) 编辑
摘要: 此算法由LQD提供 阅读全文
posted @ 2016-03-18 14:49 隅子酱 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 1 srand((unsigned)time(NULL)); //以时间为随机种子,写在循环前才有效(几个循环无所谓) 2 for(i=1;i<=size;i++) 3 { 4 for(j=1;j<=size;j++) 5 { 6 7 if(1==rand()%10) ... 阅读全文
posted @ 2016-03-18 14:44 隅子酱 阅读(1000) 评论(0) 推荐(0) 编辑