Score : 100 points
There is a set A = \{ a_1, a_2, \ldots, a_N \} consisting of N positive integers. Taro and Jiro will play the following game against each other.
Initially, we have a pile consisting of K stones. The two players perform the following operation alternately, starting from Taro:
A player loses when he becomes unable to play. Assuming that both players play optimally, determine the winner.
Input is given from Standard Input in the following format:
N K a_1 a_2 \ldots a_N
If Taro will win, print First
; if Jiro will win, print Second
.
2 4 2 3
First
If Taro removes three stones, Jiro cannot make a move. Thus, Taro wins.
2 5 2 3
Second
Whatever Taro does in his operation, Jiro wins, as follows:
2 7 2 3
First
Taro should remove two stones. Then, whatever Jiro does in his operation, Taro wins, as follows:
3 20 1 2 3
Second
3 21 1 2 3
First
1 100000 1
Second