|
|
вернуться в форум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? 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 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! 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 :) Also my implementation of Manacher failed at test 5 And I decided to use naive |
|
|