saisurya027's blog

By saisurya027, history, 4 years ago, In English
 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Why don't you read the editorial http://codeforces.com/blog/entry/8903

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I read it but I didn't understand the logic behind it.So thought someone would explain it in simple way.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      dp[i][j][k] : max { length(s) : s is LCS of s1[0,i[ and s2[0,j[, suffix of s and virus share k chars }.

      use KMP to do the state transition.