Given R red balls, B blue balls, and G green balls. Count ways to arrange them so that there are exactly k pair RB (red ball is
in front of blue ball).
K <= min(R, B) R, B, G, K <= 1e6
Thanks!
Math problem.
Given R red balls, B blue balls, and G green balls. Count ways to arrange them so that there are exactly k pair RB (red ball is
in front of blue ball).
K <= min(R, B) R, B, G, K <= 1e6
Thanks!