编程介的小学生 2017-11-28 04:59 采纳率: 20.5%
浏览 810
已采纳

Bricks

Problem Description
Little White bought a new house recently. She doesn't like the design of the floor anyway, so she decides to decorate the floor. Now she has bricks of the 5 shapes below, all with an infinite amount.

Bricks cannot overlap each other, and you cannot rotate them to fit in the "holes".

Now, please tell Little White how many units can she cover using these bricks.

Input
For every test case, you are given two integers n and m indicating the floor is an n*m rectangle

consisting of n*m 1*1 grids.(1<=n<=100,1<=m<=6)

Proceed to the end of file.

Output
For every test case, print an integer on a single line, representing the maximum possible area that can

be covered.

Sample Input
1 4
2 3
3 2
4 4

Sample Output
0
4
4
12

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-12-24 14:54
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码