### shishir.hstu's blog

By shishir.hstu, history, 2 years ago,

Problem link: https://www.spoj.com/problems/QUEEN/ I am getting this problem WA. But don't know why? My code:https://pastebin.com/bieHYd72 Thanks advance.

• +6

 » 2 years ago, # |   +11 Seriously bro? You expect people to help when all you provide is a mess of code?
 » 2 years ago, # |   0 The problem states that 'The queen can go any number of cells in any of eight directions in a single move' but you move it only one cell. So besides vis you need real grid.
•  » » 2 years ago, # ^ |   0 The queen can go any number of cells in any of eight directions in a single move, but it can't pass through or stand on the occupied cells and leave the board. I also try to go eight direction from current position without occupied cell not only one cell.
•  » » » 2 years ago, # ^ |   0 You can consider the following input: 1 5 5 S.... ..... ..... ..... ....F Is the printed number correct? https://ideone.com/uU7cYY
•  » » » » 2 years ago, # ^ | ← Rev. 2 →   0 Yea! I got Ac.
 » 2 years ago, # |   +5 The queen's dress might be getting in the way, so she trips. Buy her another one.