编程介的小学生 2019-08-09 23:34 采纳率: 20.5%
浏览 71

砖块的构成问题,怎么采用C语言的办法做

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 用三极管设计—个共射极放大电路
    • ¥15 请完成下列相关问题!
    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示