码迷,mamicode.com
首页 >  
搜索关键字:矩阵快速幂 邀请赛    ( 1671个结果
hdu 2243 考研路茫茫——单词情结(AC自动机+矩阵快速幂)
题目链接:hdu 2243 考研路茫茫——单词情结 题目大意:略。 解题思路:和poj 2778 DNA Sequence类似的做法,不同的是这道题目是要求小于长度L的,所以要多加一个维护总 和,做过矩阵快速幂的人肯定都会这个。然后我们肯定是先算出不包含词根的,用总的减掉就是要求的答案,所以我又 加了两个用来维护总的,长度为i时,总的可能串有26i,累加。题目要求取模264...
分类:其他好文   时间:2014-11-09 12:41:14    阅读次数:248
poj 2778 DNA Sequence(AC自动机+矩阵快速幂)
题目链接:poj 2778 DNA Sequence 题目大意:给定一些含有疾病的DNA序列,现在给定DNA长度,问有多少种不同的DNA序列是健康的。 解题思路:对DNA片段建立AC自动机,因为最多10个串,每个串最长为10,所以最多可能有100个节点,在长度为n时 以每个节点终止的健康字符串个数形成一个状态集,通过AC自动机形成的边可以推导出n+1的状态集,走到单词节点是 ...
分类:其他好文   时间:2014-11-09 01:10:37    阅读次数:265
POJ3070:Fibonacci(矩阵快速幂模板题)
http://poj.org/problem?id=3070#include #include #include #include #include #define mod 10000using namespace std;struct m{ int a[3][3];} init,res;in...
分类:其他好文   时间:2014-11-08 19:41:00    阅读次数:150
HDU1575:Tr A(矩阵快速幂模板题)
http://acm.hdu.edu.cn/showproblem.php?pid=1575#include #include #include #include #include #define mod 9973using namespace std;struct matrix{ int a...
分类:其他好文   时间:2014-11-08 16:34:23    阅读次数:142
zoj 3538 Arrange the Schedule(矩阵快速幂)
Arrange the Schedule Time Limit: 1 Second      Memory Limit: 65536 KB In Summer 2011, the ZJU-ICPC Team has a n-days training schedule. ZJU-ICPC Team has been divided into 4 Group: Akiba, BiliBi...
分类:其他好文   时间:2014-11-05 21:37:51    阅读次数:284
HDU5092——Seam Carving(动态规划+回溯)(2014上海邀请赛重现)
Seam CarvingDescriptionFish likes to take photo with his friends. Several days ago, he found that some pictures of him were damaged. The trouble is th...
分类:其他好文   时间:2014-11-05 19:26:39    阅读次数:255
poj 3613 经过k条边最短路 floyd+矩阵快速幂
经过k条边最短路...
分类:其他好文   时间:2014-11-05 17:13:38    阅读次数:179
HDOJ 4686 Arc of Dream 矩阵快速幂
矩阵快速幂:根据关系够建矩阵 , 快速幂解决.Arc of DreamTime Limit: 2000/2000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2164Accepted Su...
分类:其他好文   时间:2014-11-05 06:58:32    阅读次数:347
HDOJ 4686 Arc of Dream 矩阵快速幂
矩阵快速幂: 根据关系够建矩阵 , 快速幂解决. Arc of Dream Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 2164    Accepted Submission(s): 680 ...
分类:其他好文   时间:2014-11-05 00:24:57    阅读次数:339
2014上海全国邀请赛 解题报告
2014上海全国邀请赛 解题报告...
分类:其他好文   时间:2014-11-04 17:34:34    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!