Question: i need code in any programming language python3 is prefered 3:05 PM Problem Statement Python 3 There are N people standing in a line, and



3:05 PM Problem Statement Python 3 There are N people standing in a line, and M prizes are also spread along that line in addition, there is an endpoint at position P, which everyone should finally end at 1 import sy 2 3 deftin 5 . You need to match each person with one and only one peze such that the maximum of times needed for each person to collect his prize and then go to the endpoint is as minimum as possible. It is given that no two people can be matched with the same prize 7 def maino: NE 10 11 Mint Nole 1 P. Inte Number of gifts is always greater than or equal to the number of people It takes one unit of time for each person to move one unit of distance . A-0 For in 12 A. api B01 Input Format The first line contains an integer N denoting the number of elements in A The next line contains an integer M denoting the number of elements in B The next tine contains an integer p denoting the position of the endpoint. 20 FOR B. ADD Select language Python 3 Input Format The first line contains an integer, N. denoting the number of elements in A The next line contains an integer, M. denoting the number of elements in B. The next line contains an integer, P.denoting the position of the endpoint Each line i of the N subsequent lines (where 0 si>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
