#K85382. Grid Conquest: Determining the Winner
Grid Conquest: Determining the Winner
Grid Conquest: Determining the Winner
You are given a grid with n rows and m columns, i.e., a grid of size \( n \times m \). In this game, Alice starts at the top-left corner \((1,1)\) and Bob starts at the bottom-right corner \((n, m)\).
The players take turns to move, with Alice moving first. Both players play optimally. It can be shown that if either \(n\) or \(m\) is odd, then Alice has a winning strategy. Otherwise, if both \(n\) and \(m\) are even, Bob will win.
Your task is to determine the winner given the grid dimensions.
inputFormat
The input consists of a single line with two space-separated integers \(n\) and \(m\), representing the number of rows and columns of the grid.
outputFormat
Output a single line containing the winner's name: either Alice
or Bob
.
3 3
Alice