anucode's blog

By anucode, history, 108 minutes 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
  • 0
  • Vote: I do not like it

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

your code might be just wrong

»
39 minutes 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.

»
9 minutes 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.