|
|
вернуться в форумMy AC code: input: > 3 3 > 1 2 1 > 1 2 1 > 1 3 1 > -1 output: > No solution. Why not > 1 2 There are two roads connecting "1" and "2", so the route could be 1 - 2 - 1, with different road 1 - 2 and 2 -1 "Each sightseeing route is a sequence of road numbers y1, …, yk, k > 2." Oops. Sorry for bothering! "Each sightseeing route is a sequence of road numbers y1, …, yk, k > 2." |
|
|