pengyule's blog

By pengyule, 3 years ago, In English

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?

  • Vote: I like it
  • -29
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it +26 Vote: I do not like it

problem solved.

»
3 years ago, # |
  Vote: I like it +18 Vote: I do not like it

why-25