結果
| 問題 | No.2044 Infinite Nim |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2022-08-20 01:26:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 454 bytes |
| 記録 | |
| コンパイル時間 | 502 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 25,232 KB |
| 最終ジャッジ日時 | 2026-04-24 23:32:58 |
| 合計ジャッジ時間 | 9,563 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 7 |
ソースコード
import sys
input = sys.stdin.readline
N=int(input())
A=list(map(int,input().split()))
XOR=0
zero=0
zflag=0
for a in A:
if a!=-1:
XOR^=a
zflag=1
else:
zero+=1
zero%=2
if zflag==0:
if zero==1:
print("First")
else:
print("Second")
elif zero==0:
if XOR==0:
print("Second")
else:
print("First")
else:
if XOR!=0:
print("First")
else:
print("Second")
titia