摘要: 病毒侵袭持续中Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4619Accepted Submission(s): 1646Problem Description小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打没有 阅读全文
posted @ 2013-08-05 22:50 SunnySnail 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2222题目参考:http://www.notonlysuccess.com/index.php/aho-corasick-automaton/此题模板:#include #include #include #include #include #include #include #include #include #include #include using namespace std;typedef long long ll;typedef unsigned long long ull;const i 阅读全文
posted @ 2013-08-05 19:43 SunnySnail 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 病毒侵袭Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7924Accepted Submission(s): 2061Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气, 阅读全文
posted @ 2013-08-05 19:39 SunnySnail 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 地址:http://poj.org/problem?id=3321 http://acm.hit.edu.cn/hoj/problem/view?id=2743这两道题其实一个意思,题意是一棵苹果树,分叉,用poj的题意来讲,每个叉有个编号,根节点永远是1,然后按它输入的每两个数相连,构成一棵树,初始每个节点一个苹果,输入C和一个数字,如果此节点有苹果,让它变为0,如果没有苹果,让它变为1,输入Q,查询这个节点的子树上有多少个苹果。这道题是今天做的第一道DFS序,其实本质还是线段树,单点变换,区间求和,模板都固定,就是看怎么构树,用vector存数据,如1节点连着2,3,那么v[1]里存入2. 阅读全文
posted @ 2013-08-02 17:00 SunnySnail 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Card HandsMy Tags(Edit)Source:unknownTime limit: 2 secMemory limit: 64 MSubmitted: 204,Accepted: 49Jim is writing a program for statistically analyzing card games. He needs to store many different card hands in memory efficiently. Each card has one of foursuitsand one of thirteenvalues. In his imple 阅读全文
posted @ 2013-08-02 08:50 SunnySnail 阅读(490) 评论(0) 推荐(0) 编辑
摘要: Power StringsTime Limit:3000MSMemory Limit:65536KTotal Submissions:27230Accepted:11401DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplicatio 阅读全文
posted @ 2013-08-01 16:51 SunnySnail 阅读(145) 评论(0) 推荐(0) 编辑
摘要: OulipoTime Limit:1000MSMemory Limit:65536KTotal Submissions:16965Accepted:6821DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’affirm 阅读全文
posted @ 2013-08-01 10:29 SunnySnail 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Cinema in AkibaTime Limit:3 Seconds Memory Limit:65536 KBCinema in Akiba (CIA)is a small but very popular cinema inAkihabara. Every night the cinema is full of people. The layout ofCIAis very interesting, as there is only one row so that every audience can enjoy the wonderful movies without any anno 阅读全文
posted @ 2013-08-01 00:25 SunnySnail 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Buy TicketsTime Limit:4000MSMemory Limit:65536KTotal Submissions:10464Accepted:5069DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedules g 阅读全文
posted @ 2013-08-01 00:14 SunnySnail 阅读(148) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:46017Accepted:13501Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interv 阅读全文
posted @ 2013-07-31 11:35 SunnySnail 阅读(137) 评论(0) 推荐(0) 编辑