#P1896. [SCOI2005] 互不侵犯
[SCOI2005] 互不侵犯
Description
On an chessboard, place kings so that they do not attack each other. How many placement schemes are there? A king can attack one square in each of the eight directions: up, down, left, right, and the four diagonals (upper-left, lower-left, upper-right, lower-right), for a total of squares.
Input Format
There is only one line containing two integers .
Output Format
The number of such arrangements.
3 2
16
Hint
Constraints and Conventions
For all testdata, , .
: The testdata has been strengthened.
Translated by ChatGPT 5
京公网安备 11011102002149号