結果

問題 No.2044 Infinite Nim
ユーザー titiatitia
提出日時 2022-08-19 22:46:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 21,392 KB
最終ジャッジ日時 2024-04-17 01:23:43
合計ジャッジ時間 3,165 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,496 KB
testcase_01 AC 32 ms
10,496 KB
testcase_02 AC 32 ms
10,496 KB
testcase_03 AC 35 ms
10,496 KB
testcase_04 AC 31 ms
10,496 KB
testcase_05 AC 31 ms
10,496 KB
testcase_06 AC 31 ms
10,496 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 31 ms
10,368 KB
testcase_10 AC 32 ms
10,496 KB
testcase_11 AC 31 ms
10,624 KB
testcase_12 AC 31 ms
10,496 KB
testcase_13 AC 61 ms
15,336 KB
testcase_14 AC 48 ms
13,284 KB
testcase_15 WA -
testcase_16 AC 48 ms
13,440 KB
testcase_17 AC 66 ms
17,672 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 59 ms
15,180 KB
testcase_21 WA -
testcase_22 AC 61 ms
14,884 KB
testcase_23 AC 51 ms
13,824 KB
testcase_24 AC 66 ms
16,540 KB
testcase_25 AC 51 ms
14,248 KB
testcase_26 AC 65 ms
16,640 KB
testcase_27 AC 49 ms
13,056 KB
testcase_28 AC 80 ms
18,700 KB
testcase_29 AC 54 ms
14,988 KB
testcase_30 AC 67 ms
16,256 KB
testcase_31 AC 84 ms
19,868 KB
testcase_32 AC 84 ms
19,196 KB
testcase_33 AC 83 ms
19,068 KB
testcase_34 AC 75 ms
17,024 KB
testcase_35 AC 87 ms
21,392 KB
testcase_36 AC 30 ms
10,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
A=list(map(int,input().split()))

XOR=0
zero=0
for a in A:
    if a!=-1:
        XOR^=a
    else:
        zero+=1

if zero==0:
    if XOR==0:
        print("Second")
    else:
        print("First")

else:
    if zero%2==1:
        print("First")
    else:
        print("Second")
0