The same ball: 1 box cannot be empty: the baffle serves n balls continuously, and is divided into m boxes by (m- 1) baffles. There is one method in C(n- 1)(m- 1); 2. The box can be empty: replace the baffle with elements and regard the baffle as a small ball, so select * * (n+m- 1) elements and put the baffle at (m- 1) positions * * c (n+m-1) (m-)
Very abstract. Understand for yourself.