結果

問題 No.2044 Infinite Nim
ユーザー 👑 rin204rin204
提出日時 2022-08-19 21:43:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 396 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 82,636 KB
実行使用メモリ 88,716 KB
最終ジャッジ日時 2024-04-17 00:23:36
合計ジャッジ時間 3,103 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,152 KB
testcase_01 AC 34 ms
52,648 KB
testcase_02 AC 36 ms
52,668 KB
testcase_03 AC 35 ms
52,820 KB
testcase_04 AC 36 ms
52,944 KB
testcase_05 WA -
testcase_06 AC 34 ms
53,292 KB
testcase_07 AC 34 ms
52,272 KB
testcase_08 AC 39 ms
53,256 KB
testcase_09 AC 33 ms
52,608 KB
testcase_10 AC 36 ms
52,000 KB
testcase_11 AC 35 ms
51,832 KB
testcase_12 AC 35 ms
52,532 KB
testcase_13 AC 56 ms
75,856 KB
testcase_14 AC 51 ms
71,648 KB
testcase_15 AC 45 ms
67,504 KB
testcase_16 AC 48 ms
69,480 KB
testcase_17 AC 64 ms
84,720 KB
testcase_18 AC 45 ms
67,892 KB
testcase_19 AC 47 ms
68,684 KB
testcase_20 AC 54 ms
76,260 KB
testcase_21 AC 68 ms
87,200 KB
testcase_22 AC 52 ms
74,900 KB
testcase_23 AC 49 ms
71,324 KB
testcase_24 WA -
testcase_25 AC 50 ms
73,936 KB
testcase_26 WA -
testcase_27 AC 45 ms
67,820 KB
testcase_28 AC 69 ms
88,716 KB
testcase_29 WA -
testcase_30 AC 56 ms
81,112 KB
testcase_31 AC 60 ms
82,872 KB
testcase_32 AC 61 ms
83,444 KB
testcase_33 AC 61 ms
83,400 KB
testcase_34 AC 57 ms
79,808 KB
testcase_35 AC 60 ms
84,764 KB
testcase_36 AC 36 ms
53,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
c = A.count(-1)
if c == 0:
    x = 0
    for a in A:
        x ^= a
    if x == 0:
        print("Second")
    else:
        print("First")
elif c == 1:
    print("First")
else:
    cnt = {}
    for a in A:
        cnt[a] = cnt.get(a, 0) + 1
    if all(not v & 1 for v in cnt.values()):
        print("Second")
    else:
        print("First")
0