*********************ptata

unable to make the bool function
#include
using namespace std;
bool canMakeParathas(int rank[],int c,int p,int time){
int time_cook = 1;
int count = 1
for(int i=0;i<c;i++){
time_cook +=(rank[i]*i);
if(time_cook <= time){

    }
    
  }

}
int main(){

cin>>p>>c;
for(int i=0;i<c;i++)
{
cin>>rank[i];
}
int s=0;
int e=(prank[0](p*rank[0]+1))/2;//time taken by fastest cook to make parathas alone
int ans;
while(s<=e){
int m=(s+e)/2;
bool partha = canMakeParathas(rank,c,p,m);
if(paratha){
ans = m;
e=m-1;
}
else
s=m+1;
}
cout<<ans<<endl;
return 0;}

check this out