Question: Problem Description There are A cities connected by A-1 bi-directional roads such that all the cities are connected. Roads are given by array 20 array
Problem Description There are A cities connected by A-1 bi-directional roads such that all the cities are connected. Roads are given by array 20 array B where ith road connects B[i][0] city to B[i][1] You go on C trips where on the i- th trip you travel from C[i][0] city to C[i][1] city. All the trips are independent of each other. You have to pay a tax on D[i] on entering or leaving the i-th city. If you pay the tax white entering then you don't need to pay at the time of leaying. You can choose some non-adjacent citios and make their tax half. What can be the minimum sum of taxes you pay for all the c trips? Since the answer can be large, return the remainder after dividing it by 109+7. Problem Constraints 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
