Question: In python Problem Statement AA You are given an array Arr of size N. You need to perform exactly K operations on the array. In



In python
Problem Statement AA You are given an array Arr of size N. You need to perform exactly K operations on the array. In one operation the following tasks reeds to be done Choose an element Arr[i] If Arr[i] is 0 it remains 0 otherwise subtract one from this element hence after this operation Arr[i]=Arri)-1. Assume that you perform operations optimally. Your task is to find the maximum possible value of multiplication of array elements after performing exactly K operations. Since the answer can be very large return it modulo 10^9+7 Input Format The first line contains an integer, N, denoting the number of elements The next line contains an integer, K, denoting the number of operations. 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
