国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Codeforces--Domino piling

2019-11-06 08:50:58
字體:
來源:轉載
供稿:網友

Domino piling time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output

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:

Each domino completely covers two squares.

No two dominoes overlap.

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.

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

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

Examples input 2 4 output 4 input 3 3 output 4

#include<stdio.h>int main(){ int m,n; scanf("%d%d",&m,&n); int num=m*n;
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 响水县| 彭州市| 靖安县| 荣成市| 揭西县| 长宁区| 新巴尔虎右旗| 鄢陵县| 泸水县| 岳阳县| 临江市| 仁怀市| 河津市| 孙吴县| 阳江市| 武隆县| 武宣县| 衡阳县| 南乐县| 龙里县| 麻江县| 怀集县| 休宁县| 贵阳市| 肇州县| 科尔| 克什克腾旗| 金乡县| 呼玛县| 土默特左旗| 凤山市| 芷江| 江油市| 福清市| 潜江市| 赤壁市| 应用必备| 开平市| 巴彦县| 津市市| 浦县|