POJ
文章平均质量分 77
MaverickFW
It's Maverick
展开
-
【POJ1159】【DP】17.2.6 T1 强迫症 题解
题目描述 回文串就是正反着看都一样的串(如abba,acbca)。jyb 不幸得了回文串强迫症,看到一个串就想把它变成回文串。jyb 可以在串中任意位置插入字符。例如Ab3bd,插入2 个字符可以变dAb3bAd 或者 Adb3bdA。现在jyb 想知道,最少插入多少个字符,才能把一个串变成回文串呢? 【输入格式】 一个包含大小写字母和数字的字符串s,区分大小写。 【输出格式】 一个整数,原创 2017-02-06 21:08:15 · 519 阅读 · 0 评论 -
【POJ2778】【AC自动机】【矩阵快速幂】17.2.9 T2 DNA Sequence 题解
DNA Sequence 基因序列可以看做是只含大写ACGT 的字符串。 现有n 个癌症序列,每个癌症序列有至多10 个字符。 现请问不含癌症序列的长度为len 的基因有多少个?答案对100000 取模。 【输入格式】 第一行两个数n, len,表示癌症序列的个数和待求基因的长度。 接下来n 行,每一行一个字符串,表示癌症序列。 【输出格式】 一个整数,表示不含癌症序列的长度为le原创 2017-02-09 19:54:04 · 482 阅读 · 0 评论 -
【POJ1260】【斜率优化DP】Pearls题解
PearlsIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the royal family of原创 2017-05-19 17:12:33 · 444 阅读 · 0 评论 -
【POJ1160】【四边形优化DP】Post Office
Post OfficeThere is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each village is identified with a single integer coordinat原创 2017-05-19 21:55:28 · 515 阅读 · 0 评论 -
【POJ2125】【网络流】【最小割】Destroying The Graph 题解
Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that Bob tries to destroy it. In a move he may take any vertex of the graph and remove ei原创 2017-06-07 18:41:34 · 364 阅读 · 0 评论 -
【POJ3155】【网络流】【最大密度子图】Hard Life 题解
John is a Chief Executive Officer at a privately owned medium size company. The owner of the company has decided to make his son Scott a manager in the company. John fears that the owner will ultimatel原创 2017-06-07 19:00:42 · 651 阅读 · 0 评论 -
【POJ1113】【计算几何】Wall 题解
Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King’s castle. The King was so greedy, that he would not listen to his Architect’s proposals to build原创 2017-08-19 21:25:42 · 736 阅读 · 0 评论 -
【POJ3348】【计算几何】Cow 题解
Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are forced to save money on buying fence posts by using原创 2017-08-19 21:27:24 · 363 阅读 · 0 评论