Murthual parathas

how to make ispossible function i am not getting it how to implement

hello @sahudilip138

let say time is T (mid)  and cook i  cooks x paratha then we can say

a[i] *( 1+ 2 + 3...+x) <=T
a[i]  * (x * (x+1))/2 <=T
x*(x+1) <= 2*T/a[i]

x^2 +x - 2*T/[i] <=0

solution of this equation by sridharachary formula
x= (-1 +  sqrt(1+8 * T/ a[i]  )/ 2

so just go to each cook and compute this x. and add it to ur count.

at the end if count >=p return true otherwise return false.

for reference->

i am not getting it .
i understand that we give t time for every cook and update our paratha and if paratha become equal or greather than the required amount then we have to return it but i not getting it how to implement it.

i have shared implementation with u .pls check my last response

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.