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.
--------------------------------------
安娜和凯蒂最终来到了一个秘密实验室。
实验室里有a+b+c按钮。 原来,a按钮只能由Anna按下,b按钮只能由Katie按下,c按钮可以由他们中的任何一个按下。 安娜和凯蒂决定玩一个游戏,轮流按下这些按钮。 安娜第一个转弯。 每个按钮最多只能按一次,因此在某些时候,其中一个女孩将无法轮到她。
不能按下按钮的女孩就输了。 如果两个女孩都发挥最佳,确定谁会获胜。
输入
第一行包含一个整数 t (1≤t≤104) — 测试用例的数量。
每个测试用例由三个整数 a、b 和 c (1≤a,b,c≤109) 组成 - 只能由 Anna 按下的按钮数量,只能由 Katie 按下的按钮数量,以及 它们中的任何一个分别可以按下的按钮数量。
输出
对于每个测试用例,如果 Anna 获胜,则输出 First,如果 Katie 获胜,则输出 Second。
------------------------------
先判断c是偶数还是奇数,然后跟a相加去跟b判断大小即可;
下面是代码: