we could just use manacher's algorithm and then we can try to divide the string in two parts at any index i for which 0...i is non palindrome and i+1...n is also non palindrome that works in O(n).I remember in
I was trying to solve problem D with dsu, but I was missing an important part of the algorithm. Can someone tell me if it's possible to determine does point X belongs to some of N segments in O(log N) or O(1). Thank you in advance → Reply » » people_plus_plus 19 mo...