Help with Petr#113B

Revision en1, by challengersy, 2016-07-16 23:42:36

Hi, I tried to solve this problem. I used two vectors to store occurrences of both prefix and suffix; the problem was how to indicate that two sub-strings are different I looked for other submissions i notice that they used a map and a long long number to have this. my question is: wouldn't we have an overflow? how can we be sure that two different sub strings wouldn't have the same number as a result of overflow?

Tags #dp, #strings, #data structure

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English challengersy 2016-07-16 23:42:36 445 Initial revision (published)