Company: Cisco_SE intern_On-campus_25june
Difficulty: medium
Real-World Scenario: You’re programming a rescue robot to navigate a complex, multi-level emergency facility. The robot must reach trapped survivors while dealing with structural obstacles and limited teleportation technology. Some locations have emergency teleportation gates that can instantly transport the robot to another location, but each gate usage depletes the robot’s limited power reserves. The Challenge: Find the minimum number of steps for the robot to travel from start to target, where the robot can move to adjacent cells (1 step each) or use teleportation gates (also 1 step each, but limited uses). Input Format The input should be read from standard input (stdin) in the following format: rows cols grid (rows lines, each with cols space-separated integers) start_row start_col end_row end_col num_teleport_gates teleport_gates (num_teleport_gates lines, each with: from_row from_col to_row to_col) max_teleports Detailed Format Line 1: rows cols (grid dimensions) Next rows lines