ycperson's blog

By ycperson, history, 4 hours ago, In English

I encountered some strange difficulty with this problem: https://mirror.codeforces.com/contest/1714/problem/D. The dp idea is that dp[i] represents the answer for the problem for prefix up to position i. dp[i] takes the longest string with an occurrence ending at position i and then checks the dp answer for all positions within the string occurrence (except at i) and then the position to the left of the beginning of the string occurrence (quite similar to the tutorial solution). However, I am getting wrong answer on test case 9 still. I don't know quite why...

Could someone take a look at this submission to see what is wrong? https://mirror.codeforces.com/contest/1714/submission/293576606 (scroll to bottom for actual code, above is template stuff)

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

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by ycperson (previous revision, new revision, compare).

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by ycperson (previous revision, new revision, compare).