Question: Input Format The first line contains an integer, N, denoting the number of elements in A. The next line contains an integer, M, denoting

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 < N) contains an integer describing A[i]. Each line i of the M subsequent lines (where 0 i M) contains an integer describing B[1]. Constraints 1 2 20 15 10 9 1 10 11 15 17 2 2 100 20 40 10 30 6 100 4 optimal for the one person at position [15] to be matched with the prize at position [10] so the answer: 5 + 10 = 15 12 10 11 15 17 (11. 15) so the answer is: 4+5=9 22 100 20 40 10 30 (20, 10) and (40, 30) so: max(10 + 90, 10 +70) = 100. Languages Python 3.Java Python, C#,C.Bash PHP.Clojure, Plain JavaScript Go Ruby R Pert.C++ Select language Python 3 10 11 12 13 14 15 26 17 20 21 1 import sys 2 3 4 def getnin(N, M, P, A, 5 write your code 7 def main(): Nint (sys.stdin.re Mint (sys.stdin.rea Pint(sys.stdin.reas A= [1 for in range(N): A.append(int (sys.st 8-11 for in range(M): 8.append(int(sys.std
Step by Step Solution
3.41 Rating (160 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
