Company: Cisco_SE intern_On-campus_25june
Difficulty: medium
Real-World Scenario: Imagine you're an infrastructure engineer assigned to place monitoring sensors along a stretch of critical pipeline or highway. Every sensor covers a fixed distance to each side of wherever it's installed. The goal is to cover every critical monitoring point while deploying as few sensors as possible. The Challenge: Given the positions of the critical points that need monitoring and each sensor's coverage range, work out the smallest number of sensors that covers every one of those points. Input Format Read the input from standard input (stdin) in the following layout: num_critical_points critical_points (num_critical_points space-separated integers) sensor_range Detailed Format Line 1: num_critical_points (number of critical monitoring points) Line 2: num_critical_points space-separated integers representing positions of critical points Line 3: sensor_range (coverage range of each sensor in both directions) Sample Input 5 1 2 3 5 9 2 Input Explanation: There are 5