Please explain “During this time infection uses teleport one time and infect all the planets that can be achieved in one teleport jump”. If the infection was on a planet no 2 and it is directly linked to 3, 4. So, would the teleport be stopped with planets directly connected to 2, 3, 4? Or just with 2?
You should not discuss or ask contest problems during a contest. You have to either wait for the editorials or try hard. Else you will be suspended.
“During this time infection uses teleport one time and infect all the planets that can be achieved in one teleport jump” pretty much describes it. If a planet gets infected, the infection spreads to any planet with whom it has a teleport link (and that’s when they are shut down to stop further contamination). Therefore, if 2 gets infected and there exists a teleport link between 2 and 3 and 2 and 4, all 2,3 and 4 would be infected. (And that’s when they shut down). I hope its clear to you now. The problem was fun to solve.
Can someone please explain the example clearly that is provided in the problem statement.
is O(n^2) time complexity is not acceptable for sub-task 2 & sub-task 3?
can anyone pls upvote me i need to ask a question ?
Lets wait for the editorial.
if 2 is infected then only planets directly linked with the planet will be infected (3,4) and those planents which r connected to planet 3,4 will not be infected. plz upvote me i need to ask a question
Hey mathecodician, I have changed the question to the specific query.
OK, good .
Would 4 be infected in this case?
2->3->4 (2 is linked to 3 and 3 is linked to 4)