Please help me to correct this code
Mistakes
-
you have to take no of array element first then no of painters
-
consider time only at the end
first minimize the max no of board painted by each painter then at end multiply with time. -
long long int ub=sum*tp; will be a huge number which overflow the long long int
so best is to consider the time at end only -
also i have changed the function ispossible_to_paint()
Modified Code
if you have any doubt in this
feel free to ask