CF 1858A - Buttons
Anna and Katie ended up in a secret laboratory.
There are a+b+c buttons in the laboratory. It turned out that a buttons can only be pressed by Anna, b buttons can only be pressed by Katie, and c buttons can be pressed by either of them. Anna and Katie decided to play a game, taking turns pressing these buttons. Anna makes the first turn. Each button can be pressed at most once, so at some point, one of the girls will not be able to make her turn.
The girl who cannot press a button loses. Determine who will win if both girls play optimally.
Input
The first line contains a single integer t (1≤t≤104) — the number of test cases.
Each test case consists of three integers a, b, and c (1≤a,b,c≤109) — the number of buttons that can only be pressed by Anna, the number of buttons that can only be pressed by Katie, and the number of buttons that can be pressed by either of them, respectively.
Output
For each test case, output First if Anna wins, or Second if Katie wins.
--------------------------------------
安娜和凱蒂最終來(lái)到了一個(gè)秘密實(shí)驗(yàn)室。
實(shí)驗(yàn)室里有a+b+c按鈕。 原來(lái),a按鈕只能由Anna按下,b按鈕只能由Katie按下,c按鈕可以由他們中的任何一個(gè)按下。 安娜和凱蒂?zèng)Q定玩一個(gè)游戲,輪流按下這些按鈕。 安娜第一個(gè)轉(zhuǎn)彎。 每個(gè)按鈕最多只能按一次,因此在某些時(shí)候,其中一個(gè)女孩將無(wú)法輪到她。
不能按下按鈕的女孩就輸了。 如果兩個(gè)女孩都發(fā)揮最佳,確定誰(shuí)會(huì)獲勝。
輸入
第一行包含一個(gè)整數(shù) t (1≤t≤104) — 測(cè)試用例的數(shù)量。
每個(gè)測(cè)試用例由三個(gè)整數(shù) a、b 和 c (1≤a,b,c≤109) 組成 - 只能由 Anna 按下的按鈕數(shù)量,只能由 Katie 按下的按鈕數(shù)量,以及 它們中的任何一個(gè)分別可以按下的按鈕數(shù)量。
輸出
對(duì)于每個(gè)測(cè)試用例,如果 Anna 獲勝,則輸出 First,如果 Katie 獲勝,則輸出 Second。
------------------------------
先判斷c是偶數(shù)還是奇數(shù),然后跟a相加去跟b判斷大小即可;
下面是代碼: