#K55247. Taco Game
Taco Game
Taco Game
You are given a sequence of n distinct integers and a threshold value k. Two players play a game as follows: the first player wins if the difference between the maximum and the minimum elements in the sequence does not exceed k
, and the second player wins otherwise. In other words, if
\[
\max_{1 \le i \le n} a_i - \min_{1 \le i \le n} a_i > k,
\]
then the winner is "Second"; otherwise, the winner is "First".
Your task is to write a program that determines the winner when both players play optimally.
inputFormat
The input is read from standard input (stdin) and has the following format:
n k a1 a2 ... an
Here, n is the number of elements in the sequence, k is the threshold, and ai
are the distinct integers in the sequence.
outputFormat
The output is written to standard output (stdout). Print a single line containing either "First" or "Second" representing the winner of the game.
## sample5 10
15 5 1 8 14
Second