String Palindrome Problem

Can anyone help me solving this problem.
Link to problem : https://www.codechef.com/problems/CODE1603
I went through the editorial but I couldn’t understand much.
Thanks in advance