Блог пользователя aajjbb

Автор aajjbb, 14 лет назад, По-английски

Hi, I have a problem which gives two mazes, and asks if it possible to travel from some vertex (a, b) to vertex (c, d) in A maze and, go from vertex (i, j) to (k, l) in maze B with the same number of steps(the number of steps in the path).

There's a way to check if it's possible to travel in a per-determined number of steps in a graph ?

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
14 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What kind of constrainsts?

»
14 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Maybe 2 bfs's? IF (d1 % 2 == d2 % 2) answer is max(d1, d2) else INF?