Say i want to go to the cinema. There are two types of movies.
Because action is more interesting it costs 50$. And the cost for drama is 10€.
There are 200 people which wanna go action movie. 100 of those have 50 dollar bills, And the other 100 people got 100 dollar bill.
In addition there are 150 people which wanna buy a ticket for the drama movie, So that 80 have 10€ bill, and the other 70 got 20€ bills.
At the start of the day the cinema is empty, In how many ways can you sort the 350 people in a line so that anyone would be able to get an exact change for his money?