eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Форд-Беллман

опубліковано 30.03.11, 00:44:54

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

awpris відповів:
Нет
опубліковано 15.04.13, 23:10:38

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

awpris відповів:
Да. Если иное не оговорено в условии, то наличие лидирующих и концевых пробелов запрещено, а перевод строки обязателен.
опубліковано 18.10.13, 19:32:21

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

опубліковано 17.07.14, 17:04:05

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