ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1114. Boxes

some other hints
Posted by SButterfly 4 Nov 2014 15:05
1) Let's imagine, that there are n boxes and 1 another box with extra balles, which you didn't place in the first n. So, in fact you have n+1 boxes.
2) We can count the ways of putting red balles separatelly from blue ones. And blue ones separatelly from red. Than just multiply these answers.