Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Блог пользователя ThanhSon_

Автор ThanhSon_, история, 7 лет назад, По-английски

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;

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится