poj
文章平均质量分 89
glk__
wwwwwwwww
展开
-
poj 2778 DNA Sequence
题目传送门题意:给出m个DNA序列,求出长度为n的不含上述序列的个数。(0 (1 题解:首先我们应将DNA序列存入Tire中,之后可以构造一个矩阵A,A[i][j]表示从i节点状态是否可以一步转移到j节点状态。构造方法则很明显:沿着fail指针进行构造,如果它是被标记的序列那么就置为0。所以在BuildFail是要将没有儿子节点通过fail指针指向前面的节点。之后求出A^n求出方案原创 2016-07-24 20:20:03 · 372 阅读 · 0 评论 -
poj 3580 SuperMemo
题目传送门DescriptionYour friend, Jackson is invited to a TV show called SuperMemo in which the participant is told to play a memorizing game. At first, the host tells the participant a sequence of原创 2016-07-30 15:03:33 · 247 阅读 · 0 评论 -
poj 1636 Prison rearrangement
题目传送门Prison rearrangementTime Limit: 3000MS Memory Limit: 10000KTotal Submissions: 2692 Accepted: 1171DescriptionIn order to lower the risk of riots and e原创 2016-08-08 19:58:04 · 709 阅读 · 5 评论 -
[bzoj 1067 降雨量] [poj 2637 WorstWeather Ever] rmq+特判
bzoj题目传送门 poj题目传送门题意给出每年的降雨量,问X年是不是自Y年以来降雨量最多的年份(有些年份降雨量未给出)。此题在bzoj和poj的唯一区别是poj上的数据是多组,其他没有什么区别。题解此题很明显用一个rmq+特判就能轻松秒掉。搞不懂为什么有人用线段树,用ST表就行啦。#include #include #include #include using na原创 2016-08-20 13:24:15 · 274 阅读 · 0 评论 -
poj3468 A Simple Problem with Integers(zkw区间修改模板)
此题是一道线段树的裸题,这里只是为了保存我的zkw线段树模板#include <cstdio>#include <cstring>#include <iostream>using namespace std;typedef long long LL;inline int geti() { static int Ina; static char Inc; static bool InSi原创 2016-08-25 14:24:48 · 340 阅读 · 0 评论