上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要: ``` include define N 300005 using namespace std; int n,m,val[N]; struct Link_Cut_Tree{ int top,c[N][2],fa[N],xr[N],q[N],rev[N]; inline void pushup(int 阅读全文
posted @ 2017-12-30 20:21 Grary 阅读(126) 评论(0) 推荐(0) 编辑
摘要: ``` include include define N 200005 using namespace std; inline int read() { int x=0,f=1;char ch=getchar(); while(ch'9'){if(ch==' ')f= 1;ch=getchar(); 阅读全文
posted @ 2017-12-30 19:15 Grary 阅读(111) 评论(0) 推荐(0) 编辑
摘要: ``` include include include define N 200005 using namespace std; inline int read() { int x=0,f=1;char ch=getchar(); while(ch'9'){if(ch==' ')f= 1;ch=ge 阅读全文
posted @ 2017-12-30 19:14 Grary 阅读(182) 评论(0) 推荐(0) 编辑
摘要: file:///C:/Users/Frank/Downloads/QTREE%E8%A7%A3%E6%B3%95%E7%9A%84%E4%B8%80%E4%BA%9B%E7%A0%94%E7%A9%B6.pdf file:///H:/docs/%E5%85%B3%E4%BA%8ELink Cut T 阅读全文
posted @ 2017-12-26 22:03 Grary 阅读(132) 评论(0) 推荐(0) 编辑
摘要: ``` include include include include include define N 10005 using namespace std; void read(int &s){ char ch=getchar(); for(;!isdigit(ch);ch=getchar()); 阅读全文
posted @ 2017-12-26 22:00 Grary 阅读(123) 评论(0) 推荐(0) 编辑
摘要: "http://poj.org/problem?id=3308" 考虑答案不是乘积而是和的做法, 因为对于每一个伞兵我们要么在这行内安装大炮消灭它 要么在这列中安装大炮消灭它,所以容易看出这是一个最小边覆盖集的问题 所以转化成乘积需要用到一个特殊的方法(以前没用过) $ans=a_1a_2\cdot 阅读全文
posted @ 2017-12-24 17:21 Grary 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 经典的平面图转对偶图题目 "http://www.lydsy.com/JudgeOnline/status.php?problem_id=1001" 阅读全文
posted @ 2017-12-24 16:58 Grary 阅读(107) 评论(0) 推荐(0) 编辑
摘要: "poj 2887" include include include include include include include include define N 1000010 define M 2005 using namespace std; class ListTable{ public 阅读全文
posted @ 2017-12-24 13:46 Grary 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 我去,太难写了…… 块状链表作为一种集成了链表和分块的数据结构, 有着非常优秀的性质 查询和删除都是$O(\sqrt{n} )$复杂度的 需要支持的操作 1.创建一个新节点 2.插入一个新节点 3.删除一个旧节点 4.向已知节点中加入新值 5.删除已知节点中某些值 6.合并某两个相邻的节点 7.把一 阅读全文
posted @ 2017-12-24 10:30 Grary 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: 双向链表 支持删除、插入 支持向一个元素之后和之前插入一个元素 支持在第i个元素之后插入一个元素 支持删除一个元素 支持删除第i个元素 例题 Introduction Well, this time we will be a little difficult for you to do. We ar 阅读全文
posted @ 2017-12-24 09:50 Grary 阅读(226) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
博客园 首页 私信博主 编辑 关注 管理 新世界