Help on Problem 346B

Revision en1, by minimario, 2015-10-25 00:45:01

Hello, Codeforces:

I worked on problem 346B for a long time, and I could not come up with solution. Even when I read editorial and comments, the solution is still unclear to me. I know, it is KMP + DP, but I cannot see what KMP should be used on, DP transitions, etc. I know in the dp[i][j][k], i and j represent indices in str1 and str2, and k represents the longest match of the current subsequence and virus, but I cannot really get anything else.

I have worked for a few hours, but I don't have really much progress, and editorial/comments doesn't really help. So if anyone could give a clear explanation of this problem, it would be great and I would much appreciate it.

Thanks,

minimario

Tags kmp, dp, help, halp_im_dying

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English minimario 2015-10-25 00:45:01 775 Initial revision (published)