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

Автор typing_singh, история, 4 года назад, По-английски

https://cses.fi/problemset/task/1193

in this problem i m able to find out the minimum number of moves to get to the destination,but how to trace the path ,how to find string with shortest path. pls help!!
spookywooky -Baba_Yaga

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

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

While creating the distance matrix you can also create an array p[] where you store for each vertex the parent of it whenever you update the distance matrix.

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

You can ask such questions in private message,no need to write a blog for it.