QOJ.ac

QOJ

حد الوقت: 7.0 s حد الذاكرة: 512 MB مجموع النقاط: 100 قابلة للهجوم ✓

#12598. 朱大师与糖果

الإحصائيات

Master Zhu 在桌上放了 $n$ 堆糖果。两名玩家正在进行以下游戏:轮到每个玩家时,他们可以选择从同一堆糖果中拿走任意正整数个糖果,或者将某一堆糖果拆分成三个更小的非空堆。拿走最后一颗糖果的玩家获胜。

Master Zhu 希望你找出如果双方都采取最优策略,哪位玩家会获胜。

输入格式

第一行包含一个整数 $n$,表示糖果堆的数量 ($1 \le n \le 10^6$)。下一行包含 $n$ 个整数 $s_1, \dots, s_n$,表示每堆糖果的数量 ($1 \le s_i \le 10^9$)。

输出格式

如果先手玩家获胜,输出 “First”,否则输出 “Second”。

样例

样例输入 1

2
4 4

样例输出 1

Second

样例输入 2

3
1 2 4

样例输出 2

First

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.