#C6391. Taco Grid Game
Taco Grid Game
Taco Grid Game
In the Taco Grid Game, two players take turns playing on an (n \times m) grid filled with non-negative integers. Each move is governed by a set of rules based on the grid's structure. When both players play optimally, the winner is decided solely on the grid dimensions. In particular, if the grid consists of a single element (i.e. (n = 1) and (m = 1)), then the outcome is (Second) (the second player wins); otherwise, the outcome is (First) (the first player wins).
This problem tests your ability to implement a strategy based on simple observations. The main insight is that only the grid size matters: a 1×1 grid always results in a loss for the first player, while any larger grid secures a win for the first player. Use this observation to decide the winner.
inputFormat
The input is provided via standard input and has the following format:
1. The first line contains two integers (n) and (m), representing the number of rows and columns respectively.
2. The next (n) lines each contain (m) non-negative integers, representing the elements of the grid.
outputFormat
Output a single line to standard output containing either (First) or (Second), which denotes the winner when both players play optimally.## sample
1 1
0
Second