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

WA #14
Posted by MatrixDeity 14 Nov 2017 21:05
Hi, everyone!
I used Manacher's algorithm to solve this problem, but I got WA on #14 test. Can someone hint me, what could be the problem?
Re: WA #14
Posted by Mahilewets Nikita 15 Nov 2017 09:29
It could be buggy implementation
If just want to solve then you could do it with native algorithm, time limit is enough even for python
Re: WA #14
Posted by Mahilewets Nikita 15 Nov 2017 09:30
Also my implementation of Manacher failed at test 5
And I decided to use naive
Re: WA #14
Posted by MatrixDeity 15 Nov 2017 21:04
Mahilewets Nikita, thanks you for your answer!
I thought about the native solution already, but I want to solve it with Manacher's algorithm only. It is needed for increasing of my skills :)

If someone has 14th test post it, please!
Re: WA #14
Posted by MatrixDeity 18 Nov 2017 00:56
OMG, I found my mistake :) This test was useful to me: 'babadada'. Right answer is 'adada' (not 'abada').

P.s. There is same problem at Codeleet. You may peek some test there :)