Help with Petr#113B

Правка en1, от 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?

Теги #dp, #strings, #data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский challengersy 2016-07-16 23:42:36 445 Initial revision (published)