| 2025 USACO.Guide Informatics Tournament |
|---|
| Закончено |
Two best friends — Alice and Bob — are playing a Minecraft modpack when they reach the final boss. The final boss is based on the Hydra, a mythical beast which is said to grow back two heads after you chop off one of them. Luckily, the mod developers made the boss possible to beat, so it works slightly differently than that.
The hydra is initially made of $$$n$$$ heads, the $$$i$$$-th head having a strength level of $$$a_i$$$, and there is an additional parameter $$$k$$$. If Alice or Bob attacks one of the heads having $$$a_i \gt k$$$ with integer power $$$p$$$ ($$$1 \le p \le a_i$$$) — which you can choose per-attack — the strength level of the head decreases by $$$p$$$, and another head grows with $$$m$$$ strength such that $$$m$$$ is the smallest integer with $$$m^2 \ge p$$$. If any head with $$$a_i \le k$$$ is attacked, it is instantly severed and no heads regrow. Otherwise, if $$$a_i$$$ falls to zero after the attack, the head is severed, and the Hydra perishes if all heads are severed and no new ones are about to grow.
Whoever gets the final hit on the Hydra gets an achievement. Alice asks you to decide whether she should hit first or second if they both play optimally to try to get the achievement.
The first line of input contains $$$t$$$, the number of testcases ($$$1 \le t \le 10^4$$$).
The first line of each testcase contains $$$n$$$ and $$$k$$$, the number of heads that the Hydra begins with and the value of the parameter respectively ($$$1 \le n \le 10^6$$$, $$$2 \le k \le 10^9$$$).
The second line of each testcase contains $$$n$$$ space-separated integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^9$$$), the strength level of the heads which the Hydra begins with.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.
Output the word 'First' if Alice should make the first strike in order to get the achievement, or 'Second' if she should let Bob go for it.
51 1064 525 5 6 34 385 30 3 73 44 5 64 21 2 5 9
FirstSecondSecondFirstSecond
| Название |
|---|


