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 all ? 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!