luogu#P5182. 棋盘覆盖
棋盘覆盖
Problem Description
Given an by chessboard, it is known that some cells are forbidden to place on.
Find the maximum number of dominoes of length and width that can be placed on the board. The boundary of each domino must align with the grid lines (each domino occupies two cells), and no two dominoes may overlap.
Input Format
The first line contains two integers and , where is the number of forbidden cells.
The next lines each contain two integers and , indicating that the cell at row and column is forbidden. Row and column indices start from .
Output Format
Output one integer, the result.
8 0
32
Hint
,
Translated by ChatGPT 5