結果
| 問題 |
No.2044 Infinite Nim
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-19 22:09:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 568 ms |
| コンパイル使用メモリ | 82,104 KB |
| 実行使用メモリ | 87,296 KB |
| 最終ジャッジ日時 | 2024-10-09 06:06:57 |
| 合計ジャッジ時間 | 3,984 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
import sys,random,bisect
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush
from itertools import cycle, permutations
from math import log,gcd
input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())
N = int(input())
A = li()
G = 0
T = 0
for a in A:
if a==-1:
T += 1
else:
G ^= a
if G == 0 and T&1 == 0:
print("Second")
else:
print("First")