ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1297. Palindrome

sloboz O(N) [14] // Problem 1297. Palindrome 13 Apr 2004 05:57
this can be done very cool in O(N) with Suffix Trees. Try it!
Gheorghe Stefan Re: O(N) [1] // Problem 1297. Palindrome 15 Apr 2004 05:15
you maniac!
mytest Re: O(N) // Problem 1297. Palindrome 26 Apr 2004 22:03
What is the test #7? )
Dilyan please tell me how do to it in O(n) // Problem 1297. Palindrome 2 Jul 2004 15:29
write me to dpdokov@yahoo.com
or post you idia here
?!?!?!?!?!?!?!?!
Tihon Sergey Re: O(N) [1] // Problem 1297. Palindrome 10 Jan 2007 02:29
Solution O(N^3) with some optimization AC 0.001
Sandro (USU) Re: O(N) // Problem 1297. Palindrome 10 Jan 2007 16:18
Your time is not so good after rejudge. :)
Shadow of Death Re: O(N) [2] // Problem 1297. Palindrome 17 Oct 2007 23:16
Just O(2N)
Use Prefix Function!
Artem Khizha [DNU] Re: O(N) [1] // Problem 1297. Palindrome 4 Aug 2010 23:00
After all, I solved the problem by DP in O(N), counting the number of palindromes, though it is rather hard.

2 Shadow of Death:
I'm very interested in solution with prefix-function, would you be so kind to tell more about it? I'm a newbie in string-algorithms, but hope to learn them better.
mabodx Re: O(N) // Problem 1297. Palindrome 7 Sep 2010 06:59
if you have learned suffix arrays you can use that to solve these problem . it's not difficult
kima Re: O(N) [2] // Problem 1297. Palindrome 21 Nov 2009 02:42
O(N) used hash function ;)
Anuar Re: O(N) [1] // Problem 1297. Palindrome 15 Dec 2011 09:54
How did you do that?
Soucup Adrian Re: O(N) // Problem 1297. Palindrome 27 Jul 2012 19:05
Naive O( N ^ 2 ) = 0.015, 116 kb
lichtgestalt2710 Re: O(N) // Problem 1297. Palindrome 13 Feb 2014 06:41
also this can be solved with Manacher's algorithm in O(N) =)
lichtgestalt2710 Re: O(N) // Problem 1297. Palindrome 13 Feb 2014 06:41
also this can be solved with Manacher's algorithm in O(N) =)
OIdiot Re: O(N) // Problem 1297. Palindrome 14 Aug 2014 19:04
O(NlogN)?