Company: cisco_11july
Difficulty: medium
Problem Description An autonomous delivery drone fleet operates above a dense urban grid. Each drone must fly from a depot to a customer location, but its compact battery cannot last the full distance. The city has placed a sparse network of automated battery-swap kiosks on rooftops; passing over a kiosk lets a drone instantly swap in a charged battery — but only if it has an unused swap voucher allocated by the dispatch system. Vouchers are scarce and global per delivery, so the drone must plan when to swap and when to push through on remaining charge. Find the minimum number of moves required to fly from the depot at (sr, sc) to the customer at (er, ec), given a battery capacity B, a list of M swap-kiosk cells, and a fixed budget of K swap vouchers for the trip. Report -1 if no feasible delivery exists. Input rows, cols — grid dimensions grid — rows x cols matrix of 0 (open airspace) and 1 (no-fly building) (sr, sc) — depot (start) coordinates, guaranteed open (er, ec) — customer (en