Company: MediaNet_5sep
Difficulty: medium
Hungry Policemen Problem Description You are given a graph G of N nodes and M edges and each edge has some time associated with it. There is a policeman standing on each node except Node N. All of them get a report that there is thief is on Node N and the policemen start moving towards it, but all of them have been hungry for days, so they are looking to visit a few restaurants as well, before reaching the node N. There are K restaurants present on some nodes, and each restaurant has some satisfaction. Now, a policeman will only go to a restaurant if and only if the satisfaction he receives by reaching the restaurant is greater than the time he has invested in reaching there and then going to the Node N. Find and return the number of policemen who will have a meal at a restaurant. Input Format: The first argument contains an integer A, representing the number of nodes. The second argument of input contains a 2-d matrix of size M x 3, B, where Node B[i][0] and Node B[i][1] are bidirecti