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
猜你喜欢
转载自bai-du-bai-du123.iteye.com/blog/1835788
今日推荐
周排行