Here is this spoj Problem
i am using manacher’s algorithm for finding palindromic substring
but getting WA, can somebody tell where i am wrong?
Here is link to my code…
Here is this spoj Problem
i am using manacher’s algorithm for finding palindromic substring
but getting WA, can somebody tell where i am wrong?
Here is link to my code…
Your solutions give wrong answer to almost all the test cases.
example:
input
2
abbaabbacaacfguiuoppo
your output is 0 while correct answer is 5
input
3
abbbaaabbbbaaaaaabbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbb
your output is 10 while correct answer is 65.
input
2
aaaaa
your output is 2 while correct answer is 4.
hope it help to find bug in your program.
enjoy happy coding
wat modification can u tell me
My code gives the correct answer for the all testcases mentionend above but it’s still wa
my code: http://ideone.com/o2GMTa
What logical mistake did I make?
Thanks in advance!
I did not use Manacher’s Algorithm, instead I used Rabin Karp.
thanks… after little modification got AC…
pleasure is mine
change sign == to >=