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

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

опубликовано 30.03.2011, 00:44:54

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

awpris ответил:
Нет
опубликовано 15.04.2013, 23:10:38

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

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

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

опубликовано 17.07.2014, 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