eolymp
bolt
Try our new interface for solving problems
Məsələlər

Ford-Bellman

dərc olunub 30.03.11 00:44:54

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

awpris cavab verdi:
Нет
dərc olunub 15.04.13 23:10:38

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

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

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

dərc olunub 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