标签: 双连通分量

「CodeForces 1220E」 Tourism

Alex decided to go on a touristic trip over the country.

For simplicity let's assume that the country has 𝑛 cities and 𝑚 bidirectional roads connecting them. Alex lives in city 𝑠 and initially located in it. To compare different cities Alex assigned each city a score 𝑤𝑖 which is as high as interesting city seems to Alex.