ZOJ
sxk_sxy
努力用自己辛勤的汗水,成为一名真正的ACMer
展开
-
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-I ( ZOJ 3827 ) Information Entropy
Information EntropyTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeInformation Theory is one of the most popular courses in Marjar University. In this course, there is an原创 2014-10-15 22:11:42 · 1475 阅读 · 0 评论 -
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-A ( ZOJ 3819 ) Average Score
Average ScoreTime Limit: 2 Seconds Memory Limit: 65536 KBBob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical A原创 2014-10-15 21:34:15 · 1596 阅读 · 0 评论 -
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-D ( ZOJ 3822 ) Domonation
题目链接:DominationTime Limit: 8 Seconds Memory Limit: 131072 KB Special JudgeEdward is the headmaster of Marjar University. He is enthusiastic about chess and often plays原创 2014-10-17 21:54:22 · 1272 阅读 · 0 评论 -
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-K ( ZOJ 3829 ) Known Notation
Known NotationTime Limit: 2 Seconds Memory Limit: 65536 KBDo you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also k原创 2014-10-16 00:14:33 · 1866 阅读 · 2 评论 -
ZOJ 3430 Detect the Virus (AC自动机)
题目链接:Detect the Virus题意:n个模式串,一个文本串,问文本串包含几个模式串。解析:解码 + AC自动机。 解码过程:先将字符串转换成ASCII 然后根据相应的ASCII 转换成二进制,每一个是6位,不够加0,然后取8位为一个字符,求得的字符串为要的字符串。PS:注意sigma_size = 256AC代码:原创 2015-08-08 17:09:06 · 750 阅读 · 0 评论 -
ZOJ 3228 Searching the String (AC自动机)
题目链接:Searching the String解析:给一个长串,给n个不同种类的短串,问分别在能重叠下或者不能重叠下短串在长串中出现的次数。能重叠的已经是最简单的AC自动机模板题了。不能重叠的记录一下每个匹配的串的起始位置保证不重叠即可。AC代码:#include using namespace std;struct Trie{ int原创 2015-08-17 17:24:36 · 871 阅读 · 0 评论 -
ZOJ 3494 BCD Code (AC自动机 + 数位DP)
题目链接:BCD Code解析:n个病毒串,问给定区间上有多少个转换成BCD码后不包含病毒串的数。非常神奇的题目。。经典的 AC自动机 + 数位DP 的题目。首先使用AC自动机,得到bcd[i][j]表示状态i,加了数字j以后到达的状态,为-1表示不能转移然后就是数位DP了注意记录为0的状态AC代码:#include #include原创 2015-08-18 13:35:32 · 1165 阅读 · 0 评论