For this Question: Sara's team participated in an eating competition at FoodFest in which they are asked to eat at least P dishes.
Sara's team consists of N members where a member <b>i</b> (1 <= i <= N ) takes <b>Arr[i]</b> minutes to finish a single dish. Your task is to find the minimum time to finish at least P dishes.

Note: A member can eat a dish any number of times.First line of input contains two integers N and P. The next line of input contains N space separated integers depicting the values of Array.

Constraints:-
1 <= N <= 100000
1 <= Arr[i] <= 10
1 <= P <= 1000000000000Print the minimum time taken to eat at least P dishes.Sample Input:-
4 10
1 2 3 4

Sample Output:-
6

Explanation:-
1st member will eat 6 dishes
2nd member will eat 3 dishes
3rd member will eat 2 dishes
4th member will eat 1 dishes
total = 12

Sample Input:-
8 8 
1 1 1 1 1 1 1 1

Sample Output:-
1, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    int p;
    int n;
    cin>>n>>p;
    int a[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    int l=0,h=1e10;
    int mid=0;
    int cnt=0;
    int s,y;
    while(l<h){
        mid=(l+h);
        mid/=2;
        cnt=0;
        for(int i=0;i<n;i++){
            s=a[i];
            y=2;
            cnt+=mid/a[i];
        }
        
       // cout<<l<<" "<<h<<" "<<cnt<<endl;
        if(cnt<p){l=mid+1;}
        else{
            h=mid;
        }
   
    }
    cout<<l;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?