count no. of ways.

Revision en2, by sahilshelangia, 2020-05-18 13:31:47

we are given N red balls and M blue balls, we have to find no. of arrangements of (n+m) balls such that no more than k consecutive balls are of the same color.

1<n,m,k<=1000

Tags #dp, #combinatorics

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English sahilshelangia 2020-05-18 13:31:47 16 (published)
en1 English sahilshelangia 2020-05-18 13:31:04 194 Initial revision (saved to drafts)