Lucky Palindrome of November LunchTime

ltime06
treap

#1

I am doing Lucky Palindrome question of November Lunch.

http://www.codechef.com/LTIME06/problems/PALINDR

I passed it for two sub task but then getting TLE.

Editorial says we should use treap for remaining sub tasks.

Here is the link for the editorial

http://discuss.codechef.com/questions/30371/palindr-editorial


I would be very thankful if somebody can please explain me how to use treap in this question.

I know what is treap but don’t know how to use it here.

Thank you.


#2

Can you please post the link to Editorial


#3

I have posted the link, but it explains nothing about how to use treap.