#P2361. YYY Chess: First Move
YYY Chess: First Move
YYY Chess: First Move
You are about to play a game called "YYY Chess". The game is played on an A × B chessboard with black and white coins. Two players take turns placing a coin on any empty cell of the board. When placing a coin, the following rules apply:
- The target cell must be empty.
- The four direct neighbors (up, down, left, right) of the target cell must not contain a coin of the same color that you are about to place.
- The very first move of the game must be a black coin.
The game ends when a player has no valid move available, and that player loses the game. Your friend uim allows you to choose whether you would like to move first or second. Recalling a classic coin placing puzzle from elementary school where a winning pairing strategy guarantees a win, you are confident that you can always win by selecting the appropriate strategy.
Your task is simple: given the board dimensions, output a valid first move (if you decide to go first). For this problem, you only need to output a valid first move since the first move must be black and placing the coin at cell (1, 1) is always valid on an empty board.
If there are multiple valid moves, any one is acceptable; however, for simplicity, output the move "1 1 BLACK".
inputFormat
The input consists of a single line containing two integers A and B (1 ≤ A, B ≤ 109), which represent the number of rows and columns of the chessboard respectively.
You do not need to simulate the whole game; simply output a valid first move.
outputFormat
Output a single line with three items: the row number, the column number, and the coin color to be placed. The coin color must be BLACK
since the first move must always be black.
For example, a valid output is:
1 1 BLACK
sample
3 3
1 1 BLACK