anucode's blog

By anucode, history, 4 hours ago, In English

when i run my code in multiple test cases output is wrong.

when i run my code on single testcase output is correct. plzz help

code

  • Vote: I like it
  • -7
  • Vote: I do not like it

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

your code might be just wrong

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

Seems like out-of-bounds error (undetected automatically due to SSO). I would verify that i+5 and others point to valid string locations.

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

dp array doesn't change for every testcase. You have made it a global variable.

  • »
    »
    42 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it will changed in every testcase memset