上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 36 下一页
摘要: 并查集的基本使用 阅读全文
posted @ 2018-11-23 14:48 Draymonder 阅读(143) 评论(0) 推荐(1) 编辑
摘要: 用的dfs,自下往上搜索一个节点的所有祖先,然后在相应祖先 判断是否是另一个节点的祖先,如果是 就截止,否则继续往上搜索,直到搜索到,或者知道所有的祖先都被扫描完成 阅读全文
posted @ 2018-11-23 14:39 Draymonder 阅读(156) 评论(0) 推荐(0) 编辑
摘要: PathUtil ImageUtil 阅读全文
posted @ 2018-11-23 12:24 Draymonder 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 阶乘函数 斐波那契数列 #include <iostream> #include <cstring> #include <algorithm> using namespace std; // 阶乘函数 int fact(int n) { if(!n) return 1; return n * fac 阅读全文
posted @ 2018-11-21 20:32 Draymonder 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://hihocoder.com/contest/hiho12/problem/1 给出一棵树 每个节点的价值 求以1为根的树中,选取m个相联通的节点的最大价值和 阅读全文
posted @ 2018-11-20 19:24 Draymonder 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://hihocoder.com/contest/hiho11/problem/1 求树中节点对 距离最远的长度 阅读全文
posted @ 2018-11-18 12:28 Draymonder 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://hihocoder.com/contest/hiho10/problem/1 给出先序 中序 求 后序 阅读全文
posted @ 2018-11-18 10:52 Draymonder 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 状态压缩 写了两个半小时 太菜了 题目链接 https://hihocoder.com/contest/hiho8/problem/1 阅读全文
posted @ 2018-11-18 00:44 Draymonder 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 完全背包 题目链接 https://hihocoder.com/contest/hiho7/problem/1 阅读全文
posted @ 2018-11-17 21:19 Draymonder 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 01背包 题目链接 https://hihocoder.com/contest/hiho6/problem/1 阅读全文
posted @ 2018-11-17 21:16 Draymonder 阅读(86) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 36 下一页