Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve fast please Problem Description There are A cities connected by A-1 bi-directional roads such that all the cities are connected. Roads are given by
solve fast please
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 2D 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 eaeh. other. You have to pay a tax on D[i] on entering or leaving the i-th city. If you pay the tax while entering then you don't need to pay at the time of leaving. You can choose some non-adjacent cities 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 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started