bharatkulratan's blog

By bharatkulratan, history, 4 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.

Full text and comments »

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

By bharatkulratan, 12 years ago, In English

http://mirror.codeforces.com/contest/221/submission/2083431 This link is for solution of Problem C of Codeforces Round #136 (Div. 2). Problem statement: http://mirror.codeforces.com/contest/221/problem/C

I'm not getting the verdict TIME_LIMIT_EXCEEDED for the solution. If anybody could help me finding the reason behind it.

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it