ThanhSon_'s blog

By ThanhSon_, history, 7 years ago, In English

Sorry, can anyone help me please. Here is my submission for problem 427D: http://codeforces.com/contest/427/submission/26701755. I got WA on test 17 and can't understand why. My solution:

  • f[i][j]: longest common string end at s1[i] and s2[j];

  • f1[i][j]: longest common string end at s1[i] and s1[j];

  • f2[i][j]: longest common string end at s2[i] and s2[j];

  • max1[i]: longest common string end at i with all position j in s1 except i.

  • max2[i]: longest common string end at i with all position j in s2 except i.

Then for all pair(i, j) have f[i][j] > max(max1[i], max2[j]): i update answer;

  • Vote: I like it
  • 0
  • Vote: I do not like it