C. Domino piling

    传统题 1000ms 256MiB

Domino piling

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Domino piling

题面翻译

大意:

使用尽可能多的2×1标准多米诺骨牌,在以下条件的限制下填充 M×N的矩形板:

1.每个多米诺骨牌完全覆盖两个方块。

2.无重叠。

3.每块都完全放在板上,允许接触板的边缘。

Translated by @khong

题目描述

You are given a rectangular board of M×N M×N squares. Also you are given an unlimited number of standard domino pieces of 2×1 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.

输入格式

In a single line you are given two integers M M and N N — board sizes in squares ( 1<=M<=N<=16 1<=M<=N<=16 ).

输出格式

Output one number — the maximal number of dominoes, which can be placed.

样例 #1

样例输入 #1

2 4

样例输出 #1

4

样例 #2

样例输入 #2

3 3

样例输出 #2

4

7.10测验

未参加
状态
已结束
规则
IOI
题目
4
开始于
2024-7-10 16:00
结束于
2024-7-10 17:30
持续时间
1.5 小时
主持人
参赛人数
2