Company: CISCO day_ Ideathon_30june
Difficulty: medium
Real-World Scenario: You’re a network infrastructure engineer maintaining a long cable run where the signal weakens with distance, so you install signal boosters to keep every connected device receiving a strong signal. Because of how the signal propagates along the cable, a booster’s reach is not symmetric: a booster installed at position x strengthens the signal across the range [x - B, x + F] , where B is its backward reach and F its forward reach. The challenge: Given the positions of all devices that must be covered, along with the backward reach B and forward reach F , determine the minimum number of boosters required so that every device falls within at least one booster’s range. Boosters may be installed at any position along the cable. Input Format The input is read from standard input (stdin) in the following format: num_devices device_positions (num_devices space-separated integers) B F Detailed Format: Line 1: num_devices (number of devices that must be covered) Line 2: num