上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 思路:用数组存储 然后枚举起点和终点来创建子序列由于乘积很大所以要用long long 同时使用cout输出避免printf不同编译器的不同实现 阅读全文
posted @ 2017-08-21 12:01 lan126 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 除法 阅读全文
posted @ 2017-08-21 11:29 lan126 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Idealpath 双向bfs输出颜色,邻接矩阵实现 邻接表实现最短距离 阅读全文
posted @ 2017-08-20 16:59 lan126 阅读(343) 评论(0) 推荐(0) 编辑
摘要: Ideal Path 不熟悉父节点方式 自己先敲了一遍 1.发现需要vis数组来进行mark 2.无论是push过程还是pop过程发现目标节点都可以开始打印,但是push过程如果有多个parent节点会有错误. 不记录父节点的bfs 阅读全文
posted @ 2017-08-19 11:39 lan126 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; const int maxn=210; char buf[maxn][maxn]; int n; bool isnode(char ch) { if(ch=='-' || ch=='|' || ch==' ' || ch==0 || ch=='\n') retu... 阅读全文
posted @ 2017-08-17 18:04 lan126 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 (defparameter *small* 1) 2 (defparameter *big* 100) 3 4 (defun guess-my-number () 5 (ash (+ *small* *big*) -1)) 6 7 (defun smaller () 8 (setf *big* (1- (guess-my-number))) 9 (gue... 阅读全文
posted @ 2017-08-11 18:33 lan126 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 const int maxn=1000; 9 int UG[maxn][maxn]; 10 int vis[maxn]; 11 char str[1024]; 12 int in[maxn]; ... 阅读全文
posted @ 2017-08-10 19:18 lan126 阅读(110) 评论(0) 推荐(0) 编辑
摘要: uva10305 深度优先用来找入度为零0的节点 1.如果是有环的有向图则返回false 实现的代码为第九行 2.利用for循环来对节点间可能的联系进行判断,从而实现在边上移动. 拓扑排序 阅读全文
posted @ 2017-08-08 15:54 lan126 阅读(158) 评论(0) 推荐(0) 编辑
摘要: uva 816 阅读全文
posted @ 2017-08-07 17:28 lan126 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 图:油田 阅读全文
posted @ 2017-08-05 23:18 lan126 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页