Domino Piling
Practice this coding question on Coding Gurukul.
Problem statement
Cover a rectangular board with tiles that each occupy two edge-adjacent cells. Tiles can be rotated but cannot overlap or extend beyond the board. Determine the largest number of tiles that fit; leaving cells uncovered is allowed.
Input format
Two integers rows columns.
Output format
Print the maximum number of tiles.
Constraints
1 <= rows,columns <= 16.
Sample input
3 5
Sample output
7
Sign in to run or submit a solution in C++, Java or Python.