Logo
(追記) (追記ここまで)

19114번 - Master Zhu and Candies 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 512 MB82413450.000%

문제

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".

제한

예제 입력 1

2
4 4

예제 출력 1

Second

예제 입력 2

3
1 2 4

예제 출력 2

First

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2017 > Day 8: UESTC Selection C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /