Distinct Sub-palindromes

HDU - 6754