You are given a rectangular board of M × N squares. Also you are given an unlimited number of standard domino pieces of 2 × 1 squares. You are allowed to rotate the pieces. You are asked to place as many dominoes as possible on the board so as to meet the following conditions:
1. Each domino completely covers two squares.
2. No two dominoes overlap.
3. Each domino lies entirely inside the board. It is allowed to touch the edges of the board.
Find the maximum number of dominoes, which can be placed under these restrictions.
你将获得一个由M×N个正方形组成的矩形板。此外,你还将获得无限数量的标准多米诺骨牌,每块大小为2×1个正方形。你可以旋转这些部件。你需要在矩形板上放置尽可能多的多米诺骨牌,以满足以下条件:
1.每张多米诺骨牌完全覆盖两个正方形。
2. 没有两张多米诺骨牌重叠。
3. 每张多米诺骨牌都完全位于矩形板内部,允许触摸矩形板的边缘。
找到在这些限制下的多米诺骨牌的最大数量。