I think the idea is to construct the adj matrix from the given description, taking care that if there’s a type-2 communication between any two cities, they cannot be joined by an edge. Then, run BFS to check how many minimum number of cities have to be bombed. However, I’ve got a number of WAs.
Help anyone?