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

Блог пользователя _clone_

Автор _clone_, история, 4 года назад, По-английски

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!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится