結果
問題 | 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,bisectfrom collections import deque,defaultdict,Counterfrom heapq import heapify,heappop,heappushfrom itertools import cycle, permutationsfrom math import log,gcdinput = lambda :sys.stdin.readline().rstrip()mi = lambda :map(int,input().split())li = lambda :list(mi())N = int(input())A = li()G = 0T = 0for a in A:if a==-1:T += 1else:G ^= aif G == 0 and T&1 == 0:print("Second")else:print("First")