Sreedhar3210's blog

By Sreedhar3210, history, 4 hours ago, In English

I was solving this problem 2003D2 - Turtle and a MEX Problem (Hard Version).

I have made two submissions on that Accepted on G++17 278425043, Runtime error on G++20 278423515.

The code on both of the submissions is the same, but i do not know why this code isn't being accepted on G++20.

Can anyone explain this strange behaviour.

Tags gcc, c++
  • Vote: I like it
  • +1
  • Vote: I do not like it

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

I am not sure, but maybe it is because you don't return anything from DFS. It has long long type and in many other languages (to be honest, as I know all languages except C and C++) you will get RE. But sometimes it can occur in C and C++, so maybe it is the case.