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

Автор pengyule, 3 года назад, По-английски

Hi CF users. Me is needing help with CF1530F Bingo.

In fact, my solution is able to pass the first two samples, but WAs on the third where $$$n\ge 3$$$.

Yet I am not able to find a mistake in my method, which is narrated as follows:

  • Consider two cases: there is a row all-1 and there isn't one.
  • For the 1st case: brute force the mask of the all-1 rows, and calculate the Product possibility of all selected nodes.
  • For the 2nd case: Consider diagonals as columns; so there are $$$n+2$$$ columns. Dfs the mask of the all-1 columns, so for each row i we are able to calculate the $$$Product$$$ of $$$p[i][j]$$$ for those $$$(i,j)$$$ that are undetermined; the product of all $$$(1-Product)$$$ should be the possibility of "at least a column is all-1 and no row is all-1".

This is my code. Will you help me?

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

»
3 года назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

problem solved.

»
3 года назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

why-25