시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
3 초 | 512 MB | 45 | 26 | 21 | 55.263% |
Master Zhu puts $n$ heaps of candies on the table. Two players are playing the following game: on their turn, each player can either pick any positive number of candies from the same heap, or split some heap into three smaller non-empty heaps. Player who picks the last candy wins.
Master Zhu wants you to find out which player will win the game if both play optimally.
The first line of input contains an integer $n$ indicating the number of heaps ($1 \le n \le 10^6$). The next line contains $n$ integers $s_1, \ldots, s_n$ representing the number of candies in each heap ($1 \le s_i \le 10^9$).
If the first player wins, print "First
", otherwise print "Second
".
2 4 4
Second
3 1 2 4
First