2- Tiling the floor

5

2 votes
Problem

There are 3 different sizes of tiles of dimensions- 1x1, 2x2, 1x2 or 2x1 . Find the minimum no of tiles required for the floor of a room with dimensions nxm .

*Input/Output Format: * Input length of room in 1st line, breadth of room in 2nd line and then print the result in another line.

Sample input:

2

2

Sample Output:

1

Explaination:

room of dimentions 2x2 only require 1 tile of dimension 2x2

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?