acmsguru |
---|
Finished |
NOinstead of the lengths of all non-existent paths.
sample input | sample output |
4 5 5 1 4 1 2 1 2 3 1 3 4 1 1 3 1 2 4 1 | 2 2 3 NO NO |
sample input | sample output |
4 4 5 1 4 1 2 10 2 3 10 3 4 10 3 2 10 | 30 50 70 90 110 |
sample input | sample output |
2 2 10 1 2 1 2 5 2 1 7 | 5 17 29 41 53 65 77 89 101 113 |
Name |
---|