/Connected-graph-

Finding connected graphs

Primary LanguageC++

Connected graph

In a country, a disease infected K cities in one night, and for T nights the cities that are directly connected to any one of these K cities got infected. As a result, the queen removed the infected cities from the land, therefore seperated the country into individual connected states.

Given number of cities, number of bidirectional roads, number of cities infested in first night, and the amount of days passed, and bidirectional roads from city a to city b, the number of connected states the country has to be seperated into is given as an output.