Time limit
4000 ms
Memory limit
262144 kB
Source
Codeforces Round #316 (Div. 2)
Tags
combinatorics dp *2300
Editorial
Announcement Tutorial
Descriptions:

Pig and Palindromes

CodeForces - 570E