HBC51281[USACOJan2020S]BerryPickingCable TV Network题解

柳絮泡泡 算法基础篇 59 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
The interconnection of the relays in a cable TV network is bi-directional. The network is connected if there is at least one interconnection path between each pair of relays present in the network. Otherwise the network is disconnected. An empty network or a network with a single relay is considered connected. The safety factor f of a network with n relays is:. For example, consider the nets from figure 1, where the circles mark the relays and the solid lines correspond to interconnection cables. The network is connected regardless the number of relays that are removed and, according to rule , f=n=3. The network is disconnected when 0 relays are removed, hence f=0 by rule . The network is disconnected when the relays 1 and 2 or 1 and 3 are removed. The safety factor is 2.

The interconnection of the relays in a cable TV network is bi-directional. The network is connected if there is at least one interconnection path between each pair of relays present in the network. Otherwise the network is disconnected. An empty network or a network with a single relay is considered connected. The safety factor f of a network with n relays is:  1. n, if the net remains connected regardless the number of relays removed from the net.  2. The minimal number of relays that disconnect the network when removed.  For example, consider the nets from figure 1, where the circles mark the relays and the solid lines correspond to interconnection cables. The network (a) is connected regardless the number of relays that are removed and, according to rule (1), f=n=3. The network (b) is disconnected when 0 relays are removed, hence f=0 by rule (2). The network (c) is disconnected when the relays 1 and 2 or 1 and 3 are removed. The safety factor is 2.

HBC51281[USACOJan2020S]BerryPickingCable TV Network题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC51281[USACOJan2020S]BerryPickingCable TV Network题解