CBrain's blog

By CBrain, history, 4 years ago, In Russian

Hello CF.

Can somebody help me with this problem?

  • Vote: I like it
  • +1
  • Vote: I do not like it

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

It can be done by simple recursion with cutoffs.

Hint
  • »
    »
    4 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Thank you. I understood. For some reason I thought that it would be a long time.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    Sorry that I'm writing so late. I found bug on your solution. You said that on one column we can put only one queen. But we can put many queens if between them have restriction. Or am I wrong?

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      And now how I can solve this problem?

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it +5 Vote: I do not like it

      Nope, you are wrong. It was mentioned (in problem statement): "However, the reserved squares do not prevent queens from attacking each other."

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        Oh, so this problem so easy! Sorry for my dumb approval! next time I will read statement carefully!