When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

dropthebass's blog

By dropthebass, history, 6 years ago, In English

Hey guys! I'm not sure where I've gone wrong in this problem: SERGRID

A little help would be appreciated! Code

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

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

you forgot to mark visited[1][1]=1, i.e answer should be 0 in case 1x1 grid instead of level[n][m]==0 check for visited[n][m]==0