Time limit
2000 ms
Memory limit
262144 kB
Source
Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3)
Tags
data structures greedy hashing strings *2000
Editorial
Announcement Tutorial
Descriptions:

Santa Claus and a Palindrome

CodeForces - 752D