Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

maximum and minimum number of distinct binary strings

Правка en3, от _clone_, 2021-03-29 12:58:22

Given N binary string size M include 3 type of character: 0, 1, ?.

With each character ?, we can fill in this position 0 or 1.

Find the maximum and minimum of number of distinct strings after replace each ? by 0 or 1.

Have N <= 100 and M <= 30.

Example:

Input: 4 3

???

01?

001

?1?

Output: 2 4

Can anyone help me with this problem?

Thanks so much!

Теги #string

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский _clone_ 2021-03-29 12:58:22 5 Tiny change: 'r replace all ? by 0 or' -> 'r replace each ? by 0 or'
en2 Английский _clone_ 2021-03-29 12:57:29 46
en1 Английский _clone_ 2021-03-29 12:31:29 412 Initial revision (published)