Time limit
2000 ms
Memory limit
262144 kB
Source
CODE FESTIVAL 2017 Final
Descriptions:

Palindrome-phobia

AtCoder - 3603