多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > php開源 > php教程 > 50A - Domino piling

50A - Domino piling

來源:程序員人生   發布時間:2014-12-12 08:36:30 閱讀次數:3572次

A. Domino piling
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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

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.

Sample test(s)
input
2 4
output
4
input
3 3
output
4

import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int m=sc.nextInt(); int n=sc.nextInt(); System.out.println(m*n/2); } }

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 国产乱码精品一区二区三上 | 最近最新中文字幕免费的一页 | 一区二区不卡视频 | 啪啪网站视频 | 亚洲国产成人久久一区www | 伊人久久大香线蕉久久婷婷 | 国产一级性片 | 免费网站在线看 | 成人a大片高清在线观看 | 国产欧美一区二区三区视频在线观看 | 国产免费全部免费观看 | 一级特黄特色aa大片 | 一区二区三区免费 | 性久久久久久久久 | 性高跟鞋xxxxhd | 图片区小说区av区 | 性欧洲女人18 | 欧美 中文字幕 | 久久久久综合网久久 | 欧美自拍网站 | 狍和美女一级aa毛片 | 久草在线视频福利 | 日韩精品免费一级视频 | 窝窝午夜视频 | 久久久久久久国产精品视频 | 成人自拍偷拍 | 亚洲日本中文字幕天堂网 | 日韩有码在线视频 | 成人午夜在线 | 最新亚洲精品国自产在线观看 | 亚州三级视频 | 国产噜噜噜视频在线观看 | 日本午夜三级 | 亚洲麻豆精品 | 超刺激福利丝袜网站 | 国产亚洲精品成人一区看片 | 国产综合久久久久久 | 久久国内 | 国产成人毛片毛片久久网 | 中文字幕亚洲综合精品一区 | 亚洲日本国产 |