Indian Computing Olympiad

Training Material


Advanced Graph Algorithms→One Way Roads

Given a network of intersections and roads, turn all the roads into one-way roads such that every pair of intersections is still connected by a path. If it is possible, give such an orientation, else print NO.

Solution