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

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

Hello Brilliant People!

I'm trying to be fluent in Python. In that regard, I am using this as the first language for my practice in CodeForces. My solution failed with a run-time error at test case # 12, however, it had passed prior cases having similar inputs. To check if there was a loophole in my logic for the solution, I wrote it in C++, and the submission got accepted. Is there a difference between the recursive stack behaviors of C++ and Python? I guessed PyPy 3-64 wasn't allowing as many recursions as C++ does. So, I changed my recursive approach into a classic stack-based DFS approach, and then the solution in Python was accepted.

Am I thinking correctly? What things should I know regarding this?

Thanks. Happy problem-solving!

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