摘要: Description The word “the” is the most commonthree-letter word. It evenshows up inside other words, suchas “other” and “mathematics”.Sometimes it hide 阅读全文
posted @ 2016-07-19 16:28 konjak魔芋 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Description If a string is in the form UVU, where U is not empty, and V has exactly L characters, we say UVUis an L-Gap string. For example, abcbabc i 阅读全文
posted @ 2016-07-19 15:41 konjak魔芋 阅读(1083) 评论(0) 推荐(0) 编辑
摘要: The Number of Palindromes Problem Description Now, you are given a string S. We want to know how many distinct substring of S which is palindrome. Inp 阅读全文
posted @ 2016-07-19 09:43 konjak魔芋 阅读(466) 评论(0) 推荐(0) 编辑
摘要: Life Forms Description You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, col 阅读全文
posted @ 2016-07-18 11:01 konjak魔芋 阅读(550) 评论(0) 推荐(0) 编辑
摘要: Long Long Message Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his moth 阅读全文
posted @ 2016-07-17 16:32 konjak魔芋 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 怪盗基德的挑战书 Problem Description “在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“aaab sdf 阅读全文
posted @ 2016-07-17 15:46 konjak魔芋 阅读(351) 评论(0) 推荐(0) 编辑
摘要: Common Substrings Description A substring of a string T is defined as: T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|. Given two strings A, B and one integer  阅读全文
posted @ 2016-07-17 14:43 konjak魔芋 阅读(759) 评论(0) 推荐(0) 编辑
摘要: Apocalypse Someday Description The number 666 is considered to be the occult “number of the beast” and is a well used number in all major apocalypse t 阅读全文
posted @ 2016-07-17 10:00 konjak魔芋 阅读(267) 评论(0) 推荐(0) 编辑
摘要: A Plug for UNIX Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), 阅读全文
posted @ 2016-07-15 14:23 konjak魔芋 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 3530: [Sdoi2014]数数 Description 我们称一个正整数N是幸运数,当且仅当它的十进制表示中不包含数字串集合S中任意一个元素作为其子串。例如当S=(22,333,0233)时,233是幸运数,2333、20233、3223不是幸运数。 给定N和S,计算不大于N的幸运数个数。 我 阅读全文
posted @ 2016-07-14 10:48 konjak魔芋 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 2016-07-13 09:59:42 阅读全文
posted @ 2016-07-13 09:56 konjak魔芋 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Resource Archiver Time Limit: 10000MS Memory Limit: 100000KB 64bit IO Format: %I64d & %I64u Description Great! Your new software is almost finished! T 阅读全文
posted @ 2016-07-13 09:52 konjak魔芋 阅读(707) 评论(0) 推荐(0) 编辑
摘要: Description Given an N × M matrix, your task is to find the number of occurences of an X × Y pattern. InputThe first line contains a single integer t 阅读全文
posted @ 2016-07-12 15:35 konjak魔芋 阅读(614) 评论(1) 推荐(0) 编辑
摘要: 【题意】 某人读论文,一篇论文是由许多单词组成。但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次。 【分析】 个人觉得是用了反fail树的思想,Ans[i]=t[i].cnt+∑Ans[反fail]...不过因为有些节点的反fail会有很多个,存起来不方便。但是AC自动 阅读全文
posted @ 2016-07-12 10:09 konjak魔芋 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 【题意】 给定一些单词,我们定义一篇可读文章至少包含一个这样的单词,求长度为M的可读文章总数。 【分析】 用前几题的方法可以求长度为M的不可读的文章总数Sum,所以我们可以用26^M-Sum来求出可读文章的总数。不过这题的N*Len太大,也就是AC自动机的节点太多,如果用矩阵乘法求解用爆空间,所以我 阅读全文
posted @ 2016-07-12 10:08 konjak魔芋 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Lost's revenge Time Limit: 5000MS Memory Limit: 65535KB 64bit IO Format: %I64d & %I64u Description Lost and AekdyCoin are friends. They always play "n 阅读全文
posted @ 2016-07-12 09:39 konjak魔芋 阅读(654) 评论(0) 推荐(0) 编辑
摘要: Wireless Password Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u Description Liyuan lives in a old apartment. One day, he sud 阅读全文
posted @ 2016-07-11 14:01 konjak魔芋 阅读(445) 评论(0) 推荐(0) 编辑
摘要: DNA repair Time Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Description Biologists finally invent techniques of repairing DNA t 阅读全文
posted @ 2016-07-11 10:03 konjak魔芋 阅读(582) 评论(0) 推荐(0) 编辑
摘要: DNA Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14758 Accepted: 5716 Description It's well known that DNA Sequence is a sequen 阅读全文
posted @ 2016-06-23 16:20 konjak魔芋 阅读(365) 评论(0) 推荐(0) 编辑
摘要: Word Puzzles Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 10782 Accepted: 4076 Special Judge Description Word puzzles are usually simple 阅读全文
posted @ 2016-06-18 10:32 konjak魔芋 阅读(323) 评论(0) 推荐(0) 编辑