RithwikG's picture
initial commit
7a8878c
raw
history blame contribute delete
445 Bytes
Alice has n books. The 1-st book contains a1 pages, the 2-nd book contains a2 pages, …, the n-th book contains an pages. Alice does the following: She divides all the books into two non-empty piles. Thus, each book ends up in exactly one of the two piles. Alice reads one book with the highest number in each pile.Alice loves reading very much. Help her find the maximum total number of pages she can read by dividing the books into two piles.