Please subscribe to the official Codeforces channel in Telegram via the link ×

CSES, Graph Algorithms: Monsters.

Revision en2, by mirzaalarsyad, 2021-06-23 07:09:18

Problem Link:

The idea was actually pretty straightforward, just an implementation of multisource BFS (160+ lines).

My submission is still TLE on one test case (19th test case), and the rest were AC. Still can't figure it out.

Here's my submission, perhaps someone out there is willing to give a hand. Language: C++ 17.


Tags #cses, cses_helpline, #graph, #bfsgrid


  Rev. Lang. By When Δ Comment
en2 English mirzaalarsyad 2021-06-23 07:09:18 7 Tiny change: '\n\nCheers \n\n' -> '\n\nCheers^_^\n'
en1 English mirzaalarsyad 2021-06-23 07:07:57 463 Initial revision (published)