問題一覧 > 通常問題

No.2285 Make A Unit Square

レベル : / AI推定難易度 : 2100 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 46
作問者 : みここ / テスター : cureskol 👑 potato167
お気に入りにしたユーザー ProblemId : 9191 / 自分の提出
問題文最終更新日: 2023-04-26 23:54:39
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 386 (順位表) の他の問題:

Problem Statement

You are given positive integers $a, b$.

Two players play a game on the $xy$-coordinate plane. Initially, $4$ lines $x = 0, x = a, y = 0, y = b$ are drawn on the plane. Starting with the first player, the two players alternately perform one of the following operations.

  • Choose an integer $k$ such that $0 < k < a$ and the line $x = k$ has not been drawn, and draw the line $x = k$ on the plane.
  • Choose an integer $l$ such that $0 < l < b$ and the line $y = l$ has not been drawn, and draw the line $y = l$ on the plane.

The player who first makes a $1 \times 1$ square on the plane wins the game, and the game ends at that point. More precisely, if, after a player performs an operation, there exist integers $k, l$ satisfying $0 \le k < a, 0 \le l < b$ such that the lines $x = k, x = k + 1, y = l, y = l + 1$ are all drawn, that player wins the game, and the game ends at that point.

Determine which player wins the game when both players play optimally.

You are given $T$ test cases; solve each of them.

Input

$T$
test$_1$
$\vdots$
test$_T$

Here, test$_i$ represents the $i$-th test case, given in the following format.

$a \ b$
  • All input values are integers.
  • $1 \le T \le 10^5$
  • $2 \le a, b \le 10^9$

Output

Output $T$ lines. On the $i$-th line, output First if the first player wins, and Second if the second player wins.

Sample

Sample 1
Input
3
5 3
2 2
10293394 32893041
Output
First
Second
First

Here is an example of how the game may proceed in the first test case.

  1. The first player draws the line $x = 2$.
  2. The second player draws the line $y = 2$.
  3. The first player draws the line $x = 3$.

Immediately after the $3$-rd operation, a square enclosed by the lines $x = 2, x = 3, y = 2, y = 3$ is formed on the plane, so the first player wins.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。