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

Автор bharatkulratan, история, 4 года назад, По-английски

Problem Statement: Given a directed graph with N vertices and M edges. This graph may not be simple. Please decompose this graph into Strongly Connected Components and print them in topological order.

I wrote the solution in Python which was giving RE on some test case. I couldn't find the bug so rewrote the same logic in C++ which got accepted.

My question is how do I figure out these Runtime errors with my Python code. Logic should be fine, already got AC with C++ code.

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

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The test generators are on Github. You can clone the repository and generate the test cases to debug them. Instructions are here: https://github.com/yosupo06/library-checker-problems