[Solution] Fill The Grid CodeChef Solution
You have a grid with rows and columns. You have two types of tiles — one of dimensions and the other of dimensions . You want to cover the grid using these two types of tiles in such a way that:
- Each cell of the grid is covered by exactly one tile; and
- The number of tiles used is minimized.
👇👇👇👇👇
Find the minimum number of tiles you have to use to fill the grid.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
Passes for Fair CodeChef Solution
Fill Candies CodeChef Solution
Make Palindrome 2 CodeChef Solution
Fill The Grid CodeChef Solution
- Each test case consists of a single line containing two space-separated integers .
Output Format
For each test case, print on a new line the minimum number of tiles needed to fill the grid.
No comments:
Post a Comment