Help needed in a combinatorics problem

Revision en1, by skpro19, 2016-08-17 21:15:03

The problem is 294C.

The tutorial says this:

The third sample is ...#...#... where # is a switched on lamp and . is a switched off lamp. As you can see we have three different types of lights. The first three lights (Type A), the 5th to 8th lights (Type B) and the last three lights (Type C). We have to switch on the lights three times for each type of lights. Aside from the order of moves for each type there are  possible permutations of the string AAABBBCCC which tells us how to combine the steps of different types. Switching on the lights is done uniquely for types 1 and 3. But for type 2 each time we have to possible options until we're left with one off light. So there are 2^(3 - 1) ways to do this. So the answer would be 1680*1*4*1 = 6720.

I can not understand the  part. A little help would be very much appreciated.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English skpro19 2016-08-17 21:15:03 1115 Initial revision (published)