Computer Science, asked by dubey8728, 1 month ago

A famous chess grandmaster was analyzing one of his games in his head and… he suddenly forgot the positions of two important pieces.However, he is sure about some facts:the location of the first piece on the board is (x1; y1) and xl1 <= x1 <= xr1, yl1 <= y1 <= yr1the location of the second piece on the board is (x2; y2) and xl2 <= x2 <= xr2, yl2 <= y2 <= yr2the chessboard cells corresponding to the pieces are of the same colorIn other words, he doesn’t remember the exact positions of the pieces, however, for every piece, he is sure about the part of the board where it can be. Part of the board here is just a rectangular submatrix described by 4 coordinates.Note: obviously, two pieces can’t be in the same location.Now the grandmaster is wondering, how many placements of this two pieces are possible if he remembers everything correctly?if possible please provide

Answers

Answered by namanpandit574
0

mark me as brainlest

don't no

Answered by os705060
3

Answer:

step 1- make countPlacement method with formal argument int submatrix

Attachments:
Similar questions