ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1635. Mnemonics and Palindromes

Интересная задача
Posted by nobik 16 Jun 2012 00:09
A very interesting problem! Cut two successive speakers:
A. To determine the palindrome at l to r - d [l] [r] = s [l] == s [r] && d [l +1] [r-1] == 1? A: 0;
0 if it is not a palindrome, a palindrome if. Lazy dynamic)))
Two. To determine the optimal line break at the Palindromes: dp [i] = min (dp [i], dp [ij] +1);
That's all!))
Very pleased with himself))) I should think of such problems)))

Edited by author 16.06.2012 05:40

Edited by author 16.06.2012 05:42