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 2042. Nikita

Little Guide
Posted by Mickkie 21 Oct 2023 00:05
My first attempt use string hashing to check the palindrome with Segment Tree lazy prop.
O(Q*K*logK*logN), esp. for the update query and it's TLE 11

However, using Manacher algorithm with Segment Tree you can achieve O(Q*(K+lgN))

Little help:
- WA#3 : You're likely answering too much. (K involved)
- WA#9 : N=10^5, overflow somewhere