시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 11 | 3 | 3 | 30.000% |
Bobo has a binary sequence $a_{1} a_2 \dots a_{n}$. And he wants to count the number of sequences as $x_1, x_2, \dots, x_n$ satisfying the following conditions modulo $(10^9+7)$.
The first line contains $2$ integers $n, m$ ($1 \leq n \leq 5000000, 1 \leq m \leq 10$).
The second line contains $n$ integers $a_{1} a_{2} \dots a_{n}$ ($0 \leq a_i \leq 1$).
A single number denotes the number of sequence.
2 2 00
2
10 3 0101010101
26