Combinatorics

Правка en2, от LIFE_GOES_ON, 2020-06-10 21:01:35

In this 294C - Shaass and Lights I do not understand clearly what to do next. I have figured out that if there are n off lights between two on lights , number of ways to turn them on is 2^(n-1) . And for consecutive off lights having only one adjacent on light can only be turned on in one way. In the third sample test case lights from 5 to 7 can be turned on in 2^2 ways . And lights from 1 to 3 can be turned on in 1 way. Also, lights from 9 to 11 can be turned on in 1 way. So answer will be X * 1 * 4 * 1 . Now how to find this "X" ??

Теги #combinatorics

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский LIFE_GOES_ON 2020-06-10 21:01:35 2 Tiny change: 'roblem:294D] I do not' -> 'roblem:294C] I do not'
en1 Английский LIFE_GOES_ON 2020-06-10 21:00:57 543 Initial revision (published)