Can you tell whats wrong with my code?

at line no 46
int start=0;
this is incorrect

correct one
int start=a[n-1]
because we have to minimize the max no of pages read by students
and that can’t be less than maxpages