Answer to Question #327964 in Python for hari

Question #327964

Number of moves:


you are given a nxn square chessboard with one bishop and k number of obstacles placed on it. A bishop can go to different places in a single move. find the total no.of places that are possible for the bishop in a single move. Each square is referenced by a type describing the row, R, and column, C, where the square is located.


explanation: given N=6 K=2


bishop position 5 2


obstacle positions (2 2), (1 5)


the bishop can move in so o/p is 6


I/p:


6 2


5 2


2 2


1 6


O/p:


6


I/p:


6 4


3 3


1 3


3 1


5 1


1 5


O/p: 7

1
Expert's answer
2022-04-15T04:43:16-0400

The answer to your question is provided in the image:

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS