Consider the setup:
How many monsters are there? Can there be more than one?
If a monster can reach a cell in steps, can you safely pass through that cell at step ?
How do you compute when monsters reach each cell? Think about running BFS from multiple starting points. Next unit reveals the pattern.
Yes, there can be multiple monsters. Run a single BFS starting from all monster positions at once. This gives you the minimum time any monster reaches each cell. Then run BFS from your position, only visiting cells where you arrive strictly before the monsters.