ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1450. Russian Pipelines

This problem is very easy!
Posted by Andrew Sboev 8 May 2012 13:08
1) Don't forget, that you have a directed graph!
2) Also don't forget, that standard C++ streams(cin and cout) are very slow! Use scanf and printf.
3) And just use Bellman–Ford algorithm. It works by O(n*m) - in the worst case.

Edited by author 08.05.2012 13:16