Company: Cisco_3sep
Difficulty: medium
Optimal Seed Influencers Problem Description A marketing team is launching a product on a professional social network with n users, numbered 1 to n . Two users who are connected are friends; friendship is mutual. Each user i has a non-negative integer market value value[i] . Some users are potential seeds : a potential seed can be given a free trial unit at a stated integer cost . Users that are not listed as potential seeds can never be chosen. When a user is chosen as a seed, the campaign reaches that user and every user within d friendship steps of them. Formally, choosing seed s reaches every user u whose shortest-path distance from s in the friendship graph is at most d . The seed itself is at distance 0 and is therefore always reached. A user that is reached by several seeds still contributes their market value once . The team follows one fixed selection procedure, described below. Your program must simulate that procedure exactly and report what it produces. The procedure is a g