上一页 1 2 3 4 5 6 7 ··· 18 下一页
摘要: 动态加点KM这个KM模型已经比较常见了: http://blog.csdn.net/cyxhahaha/article/details/44657619构图:X 侧点为对菜品的需求,Y 侧点为厨师对菜品的供应如果让 i 厨师在倒数第 t 次制作菜品 j,花费时间为 cost(i,j)... 阅读全文
posted @ 2015-08-07 17:52 <Dash> 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 这题很有意思哦~以最小的非零系数为模数,记为 M如果存在 W 使方程有解,W 与 W’ 在模意义下同余并且 W #include #include #include #include #include #include #include #include #include #incl... 阅读全文
posted @ 2015-08-07 17:15 <Dash> 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1.非void类型的函数没有返回值[Dev-C++开启“编译警告”可以防止此问题]2.hash数组使用之前没有清零3.字符串hash时,hash值存在04.平衡树的Rotate函数,先pushdown儿子后pushdown父亲。5.连接双向边时,空间没有开边数的两倍。continui... 阅读全文
posted @ 2015-08-07 16:44 <Dash> 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 最小割,差异代价模型。#include #include #include #include #include #include const int maxn = 105, maxm = 105;const int noden = 10005, size = 4e5+5;const ... 阅读全文
posted @ 2015-08-07 16:33 <Dash> 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 我只会做送分题。。。Day1T1 离散化+并查集 T2 树链剖分,线段树维护区间内元素个数Day2 T1 Huffman树,Huffman树是严格k叉树是比较好处理的,所以加入一些权值为0的点使得 点数 mod (k - 1) = 1#include #include #includ... 阅读全文
posted @ 2015-08-06 22:22 <Dash> 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 树链剖分,线段树维护区间内最近黑点。写起来很爽。。。#include #include #include #include #include #include #include #include #include #include #include templatevoid read... 阅读全文
posted @ 2015-08-06 22:09 <Dash> 阅读(132) 评论(0) 推荐(0) 编辑
摘要: LCT。单个操作时间复杂度O(logN),然而常数巨大。杨哲《QTREE解法的一些研究》 黄志翱《浅谈动态树的相关问题及简单拓展》 #include #include #include #include #include #include #include #include #inc... 阅读全文
posted @ 2015-08-06 22:05 <Dash> 阅读(139) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=22254You are given a sequence of N integers A1, A2 .. AN. (-10000 R,那么 S[i]=S[i]+(... 阅读全文
posted @ 2015-08-06 17:40 <Dash> 阅读(133) 评论(0) 推荐(0) 编辑
摘要: AC自动机模板#include #include #include #include #include #include #include #include #include #include #include #include #include templatevoid read(... 阅读全文
posted @ 2015-08-06 17:34 <Dash> 阅读(127) 评论(0) 推荐(0) 编辑
摘要: LA 4670 AC自动机void pattern(){ memset(count, 0, sizeof(count)); int sl = strlen(str); TrieNode *now = root; for(int i = 0; i p[str[i... 阅读全文
posted @ 2015-08-06 17:30 <Dash> 阅读(124) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 18 下一页