好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CodeforcesRound#254(Div.2)A.DZYLovesChessboard

DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are good. For every good cell, DZY wants to put a chessman on it. Each chessman is either white

DZY loves chessboard, and he enjoys playing with it.

He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are good. For every good cell, DZY wants to put a chessman on it. Each chessman is either white or black. After putting all chessmen, DZY wants that no two chessmen with the same color are on two adjacent cells. Two cells are adjacent if and only if they share a common edge.

You task is to find any suitable placement of chessmen on the given chessboard.

查看更多关于CodeforcesRound#254(Div.2)A.DZYLovesChessboard的详细内容...

  阅读:39次