Dynamic help please

Revision en1, by LIFE_GOES_ON, 2020-06-12 12:40:30

766C - Mahmoud and a Message . I thought it to be a variation of stars and bars and so implemented 83511343. But got WA in test case 6. It is because I thought longest substring over all the ways would be minimum of all ai . I understood my mistake . Now , I saw the editorial , it was dp solution . Can anyone please explain it clearly ? Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English LIFE_GOES_ON 2020-06-12 12:40:30 366 Initial revision (published)