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

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

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/

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

»
5 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +11 Проголосовать: не нравится

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