#Q172. 「一本通 5.4 例 1」国王
「一本通 5.4 例 1」国王
Description
Original problem from: SGU 223
Place kings on an chessboard such that no two kings attack each other. A king can attack all 8 adjacent squares. Find the total number of valid configurations.
Input Format
A single line containing two integers and .
Output Format
Output the total number of valid configurations. If it's impossible to place the kings, output .
Sample 1
3 2
16
Sample 2
4 4
79
Constraints & Notes
For all test cases, , .