asawa_harsh's blog

By asawa_harsh, history, 3 years ago, In English

I am getting runtime error on n=1000, m=1000 test cases. Unable to figure out why.

Sorry for messed up code.

Code link: https://cses.fi/paste/ca53210d467e6f2f2d250f/

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

| Write comment?
»
3 years ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

Storing the directions as a string (for each cell) is pretty costly, you might be running out of memory while doing that.