Description
Given a m * n chess board , Find out minimum no of places to be covered to make it impossible to put a L shaped trinomo on it.
eg. In 2 * 2 chess board if you cover any 2 cells , It will be impossible to put a L shaped trinomo on it
1<=n<=10^8
1<=m<=10^8
A trinomo is a L shaped object.
*
* *
where * represents a cell.
Input
T : no of test cases (T <= 5000)
Next T lines :
every line contain m , n
Output
no of cells to be covered .
Example
Input:
1
2 2
Output:
2
Given a m * n chess board , Find out minimum no of places to be covered to make it impossible to put a L shaped trinomo on it.
eg. In 2 * 2 chess board if you cover any 2 cells , It will be impossible to put a L shaped trinomo on it
1<=n<=10^8
1<=m<=10^8
A trinomo is a L shaped object.
*
* *
where * represents a cell.
Input
T : no of test cases (T <= 5000)
Next T lines :
every line contain m , n
Output
no of cells to be covered .
Example
Input:
1
2 2
Output:
2
本文探讨了一个数学问题:如何在m*n的棋盘上放置最少数量的单元格,使得无法在棋盘上放置一个L形三连块。文章定义了问题的输入输出格式,并给出了一组示例。
1072

被折叠的 条评论
为什么被折叠?



