bharatkulratan's blog

By bharatkulratan, history, 5 years ago, In English

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.

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

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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