In a new numbers game, players are given an integer array of length N.
The players take turns, in each turn the current player does the following:
1. if a player can reorder the array elements to form a strictly increasing sequence, they win the game.
2.Otherwise, the player can choose any element and remove it from the array.
Determine which player wins the game if both players play optimally and the first player plays first.
Constraints
1<=t<=10
1<=n<=10^5
1<=ai<=10^9
Input
1
3
1 2 3
Output
First
Input
2
4
1 2 2 3
5
3 1 2 5 4
Output
Second
First
Answers
Answer:
1
navya321
Yesterday
Computer Science
Secondary School
+5 pts
Answered
In a new numbers game, players are given aninteger array of length .
The players take turns, in each turn the current player does the following:
If a player can reorder the array elements to form a strictly increasing sequence, they win the game.
Otherwise the player can choose any element and remove it from the array.
Determine which player wins the game if both players play optimally and the first player plays first.
Input Format
The first line contains an integer , denoting the number of test cases.
Then, the description of test cases follow. Each test case is given in two consecutive lines.
The first line of each test case contains an integer , denoting the number of elements in the array.
The second line of each test case contains space-separated integers , denoting the array elements.
output: