摘要: Given two strings a and b we define ab to be their concatenation. For example, if a = “abc” and b = “def” then ab = “abcdef”. If ... 阅读全文
posted @ 2018-10-19 15:47 i-Curve 阅读(176) 评论(0) 推荐(0) 编辑
摘要: The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Un... 阅读全文
posted @ 2018-10-19 11:48 i-Curve 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Manacher算法在求回文串的时候是一种很高效的算法,这里讲解一些这个算法的原理以及简单的模板。原理讲解:首先对字符串进行预处理,在字符串的中间以及两边都加上一个不会出现的字符,然后这样就可以保证我们求的字符串都是一个长度为奇数的回文串。如下:原始字符串s... 阅读全文
posted @ 2018-10-19 11:45 i-Curve 阅读(151) 评论(0) 推荐(0) 编辑