zhber
有好多做过的题没写下来,如果我还能记得就补吧

随笔分类 -  字符串算法

bzoj1717 [Usaco2006 Dec]Milk Patterns 产奶的模式
摘要:Description农夫John发现他的奶牛产奶的质量一直在变动。经过细致的调查,他发现:虽然他不能预见明天产奶的质量,但连续的若干天的质量有很多重叠。我们称之为一个“模式”。 John的牛奶按质量可以被赋予一个0到1000000之间的数。并且John记录了N(1=height[i-1]-1而且按... 阅读全文
posted @ 2015-01-14 09:05 zhber 阅读(287) 评论(0) 推荐(0)
bzoj1031 [JSOI2007]字符加密Cipher
摘要:Description喜欢钻研问题的JS 同学,最近又迷上了对加密方法的思考。一天,他突然想出了一种他认为是终极的加密办法:把需要加密的信息排成一圈,显然,它们有很多种不同的读法。例如下图,可以读作:JSOI07 SOI07J OI07JS I07JSO 07JSOI 7JSOI0 把它们按照字符串... 阅读全文
posted @ 2015-01-14 08:56 zhber 阅读(192) 评论(0) 推荐(0)
bzoj3790 神奇项链
摘要:Description母亲节就要到了,小 H 准备送给她一个特殊的项链。这个项链可以看作一个用小写字母组成的字符串,每个小写字母表示一种颜色。为了制作这个项链,小 H 购买了两个机器。第一个机器可以生成所有形式的回文串,第二个机器可以把两个回文串连接起来,而且第二个机器还有一个特殊的性质:假如一个字... 阅读全文
posted @ 2014-12-23 23:28 zhber 阅读(193) 评论(0) 推荐(0)
bzoj1009 [HNOI2008]GT考试
摘要:Description阿申准备报名参加GT考试,准考证号为N位数X1X2....Xn(0int next[30];int n,m,mod,ans;char s[30];int a[30][30],b[30][30];inline void mult(int a[30][30],int b[30][3... 阅读全文
posted @ 2014-12-16 22:49 zhber 阅读(138) 评论(0) 推荐(0)
poj1961 Period
摘要:DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whe... 阅读全文
posted @ 2014-12-14 20:22 zhber 阅读(123) 评论(0) 推荐(0)
poj2406 Power Strings
摘要:DescriptionGiven 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... 阅读全文
posted @ 2014-12-14 20:07 zhber 阅读(157) 评论(0) 推荐(0)
poj2752 Seek the Name, Seek the Fame
摘要:DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-... 阅读全文
posted @ 2014-12-14 19:48 zhber 阅读(139) 评论(0) 推荐(0)
bzoj1355 [Baltic2009]Radio Transmission
摘要:Description给你一个字符串,它是由某个字符串不断自我连接形成的。 但是这个字符串是不确定的,现在只想知道它的最短长度是多少.Input第一行给出字符串的长度,1 #include#include#include#include#include#include#include#include... 阅读全文
posted @ 2014-12-14 18:56 zhber 阅读(224) 评论(0) 推荐(0)
poj3461 Oulipo
摘要:DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. ... 阅读全文
posted @ 2014-12-14 18:49 zhber 阅读(133) 评论(0) 推荐(0)