eolymp
bolt
Try our new interface for solving problems
Problems

Ford-Bellman

published at 3/30/11, 12:44:54 am

Первый тест такой же, как в условии???

awpris replied:
Нет
published at 4/15/13, 11:10:38 pm

Есть ли какие-либо требования к переводам строки/пробелам в выводе?

awpris replied:
Да. Если иное не оговорено в условии, то наличие лидирующих и концевых пробелов запрещено, а перевод строки обязателен.
published at 10/18/13, 7:32:21 pm

Can anyone tell what's special about test 2? Many people seem to get wrong answer on it.

published at 7/17/14, 5:04:05 pm

I guess there are vertexes such that the way from vertex 1 to those doesn't exist and there are ages between that vertexes with negative weight. If you use Bellman–Ford algorithm after relaxation the distance to some of those vertexes are less then initial infinity value, but there are still not way from vertex 1 to those. Example of test that demonstrate my point is: 3 1 2 3 -1