Company: Tvs_6aug
Difficulty: medium
Drone Delivery Service Problem Description You operate a drone delivery service across N cities, numbered 1 to N . City i has an energy supply E[i] . There are M one-way roads; road j goes from city u to city v and uses f units of fuel. A delivery route starts at an initial city, follows roads in their direction, and ends at a target city: The drone can travel between cities only along the roads. A route never visits the same city twice. The same pair of cities may be joined by several roads, each with its own fuel cost. The drone collects the energy of every city on the route, including the initial city and the target city . The fuel of a route is the sum of the fuel of the roads it uses. The road network is a directed acyclic graph (DAG) : no sequence of roads leads from a city back to itself. You are given P pairs (start, end) . For each pair, among all routes from start to end , find the maximum total energy that can be collected. Then, among the routes that collect exactly that ma