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

Автор Sreedhar3210, 3 месяца назад, По-английски

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.

Even surprisingly when i removed comments from the above submission it is giving TLE verdict.

Accepted on G++17 278459735, TLE on G++20 278459715.

Can anyone explain this strange behaviour?

Теги gcc, c++
  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
3 месяца назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

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.

  • »
    »
    3 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    yes, the issue seems to be because of that unhandled return type.

    but it is also giving TLE, when i remove the comments.