In this problem, we are given that there are N books and M students. Also given are the number of pages in each book in ascending order. The task is to assign books in such a way that the maximum number of pages assigned to a student is minimum, with the condition that every student is assigned to read some consecutive books. We have to print that minimum number of pages.
Example :
Input: N = 4, pages[] = {12, 34, 67, 90}, M = 2
Output: 113