Breadth First Search: Shortest Reach

  • + 14 comments

    If you get timeout for testcase 5, have in mind that some edges appear multiple times in input (1 100 for example is listed more than 100 times), but should be taken in account only once.