結果
問題 |
No.2044 Infinite Nim
|
ユーザー |
![]() |
提出日時 | 2022-08-20 01:25:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 453 bytes |
コンパイル時間 | 332 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 21,280 KB |
最終ジャッジ日時 | 2024-10-08 13:37:38 |
合計ジャッジ時間 | 3,215 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 9 |
ソースコード
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 XOR==0: 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")