結果

問題 No.2044 Infinite Nim
ユーザー titiatitia
提出日時 2022-08-20 01:25:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,540 KB
最終ジャッジ日時 2024-04-17 03:39:34
合計ジャッジ時間 2,765 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,496 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 25 ms
10,624 KB
testcase_04 AC 25 ms
10,624 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 WA -
testcase_07 AC 25 ms
10,624 KB
testcase_08 AC 25 ms
10,624 KB
testcase_09 WA -
testcase_10 AC 24 ms
10,624 KB
testcase_11 AC 24 ms
10,624 KB
testcase_12 AC 24 ms
10,624 KB
testcase_13 AC 49 ms
15,604 KB
testcase_14 AC 41 ms
13,364 KB
testcase_15 AC 36 ms
12,884 KB
testcase_16 AC 41 ms
13,568 KB
testcase_17 AC 55 ms
17,528 KB
testcase_18 AC 36 ms
12,848 KB
testcase_19 AC 39 ms
12,928 KB
testcase_20 AC 52 ms
15,448 KB
testcase_21 AC 65 ms
18,232 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 55 ms
16,812 KB
testcase_25 WA -
testcase_26 AC 54 ms
16,852 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 51 ms
15,132 KB
testcase_30 WA -
testcase_31 AC 78 ms
19,884 KB
testcase_32 AC 73 ms
19,208 KB
testcase_33 AC 71 ms
19,216 KB
testcase_34 WA -
testcase_35 AC 79 ms
21,540 KB
testcase_36 AC 28 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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")
0