9322: ABC297 —— G - Constrained Nim 2
[Creator : ]
Description
There are $N$ piles of stones. Initially, the $i$-th pile contains $A_i$ stones. With these piles, Taro the First and Jiro the Second play a game against each other.
Taro the First and Jiro the Second make the following move alternately, with Taro the First going first:
- Choose a pile of stones, and remove between $L$ and $R$ stones (inclusive) from it.
A player who is unable to make a move loses, and the other player wins. Who wins if they optimally play to win?
Taro the First and Jiro the Second make the following move alternately, with Taro the First going first:
- Choose a pile of stones, and remove between $L$ and $R$ stones (inclusive) from it.
A player who is unable to make a move loses, and the other player wins. Who wins if they optimally play to win?
Input
The input is given from Standard Input in the following format:
```
$N$ $L$ $R$
$A_1$ $A_2$ $\ldots$ $A_N$
```
```
$N$ $L$ $R$
$A_1$ $A_2$ $\ldots$ $A_N$
```
Output
Print `First` if Taro the First wins; print `Second` if Jiro the Second wins.
Constraints
$1\leq N \leq 2\times 10^5$
$1\leq L \leq R \leq 10^9$
$1\leq A_i \leq 10^9$
All values in the input are integers.
$1\leq L \leq R \leq 10^9$
$1\leq A_i \leq 10^9$
All values in the input are integers.
Sample 1 Input
3 1 2
2 3 3
Sample 1 Output
First
Taro the First can always win by removing two stones from the first pile in his first move.
Sample 2 Input
5 1 1
3 1 4 1 5
Sample 2 Output
Second
Sample 3 Input
7 3 14
10 20 30 40 50 60 70
Sample 3 Output
First