Dominant Queens
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
On an 8×8 chessboard, it is possible to position 5 queens such that every square is either occupied by a queen or under attack by one.
Given the coordinates of one specific square on the chessboard, your task is to determine how many ways you can place 4 additional queens on the remaining squares so that, along with the queen on the given square, they form a dominating configuration.
Input
The input consists of the coordinates of one square on the chessboard.
Output
The output should be a single integer: the number of possible arrangements.
Examples
Input #1
Answer #1
Submissions 17
Acceptance rate 47%