题目连接:hdu 3068 最长回文 解题思路:通过manachar算法求最长回文子串,如果用遍历的话绝对超时. #include <stdio.h> #include <string.h> const int N = 220005; int rad[N]; char string[N], tmpstr[N]; int max(int a, int b) { return a > b ? a : b; } int min(int a, int b) { return a &l
Girls' researchTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4401 Accepted Submission(s): 1642 Problem Description One day, sailormoon girls are so delighted that they intend to research about pa
吉哥系列故事——完美队形II Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Problem Description 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1.挑出的人保持原队形的相对顺序不变,
Best Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his gr
Manachar's Algorithm Longest palindromic substring - Wikipedia https://en.wikipedia.org/wiki/Longest_palindromic_substring Longest palindromic substring From Wikipedia, the free encyclopedia Jump to navigationJump to search In computer science