My Solution for CSES — Monsters — Suggestions for Improvement are highly appreciated

Правка en1, от samadeep, 2023-09-20 06:58:04

I have used a map -> to store the time of lowest time when the Monsters can attack the square in the matrix

Parent[x][y] -> used to store where did the prev direction when a thing reached a particular square

X X X X X X X X X X X L X R R X X X X X X X D X X X X X X X D R X X X X X X X X

like this which will be used later to reconstruct the path string

Suggestions for more Such questions and concepts would be great.

Code : CPP
Теги cses, multisource bfs

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский samadeep 2023-09-20 06:59:47 38
en1 Английский samadeep 2023-09-20 06:58:04 4242 Initial revision (published)