結果

問題 No.2044 Infinite Nim
ユーザー tamatotamato
提出日時 2022-08-19 21:53:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,444 KB
実行使用メモリ 82,560 KB
最終ジャッジ日時 2024-04-17 12:02:23
合計ジャッジ時間 3,984 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
51,840 KB
testcase_01 AC 43 ms
52,480 KB
testcase_02 AC 44 ms
52,096 KB
testcase_03 AC 44 ms
51,712 KB
testcase_04 AC 46 ms
52,224 KB
testcase_05 AC 44 ms
51,584 KB
testcase_06 AC 43 ms
52,032 KB
testcase_07 AC 45 ms
51,328 KB
testcase_08 AC 50 ms
52,096 KB
testcase_09 AC 49 ms
52,096 KB
testcase_10 AC 49 ms
52,096 KB
testcase_11 AC 44 ms
51,840 KB
testcase_12 AC 44 ms
51,584 KB
testcase_13 AC 66 ms
71,680 KB
testcase_14 AC 60 ms
66,304 KB
testcase_15 AC 59 ms
65,408 KB
testcase_16 AC 59 ms
65,280 KB
testcase_17 AC 68 ms
73,472 KB
testcase_18 AC 58 ms
64,768 KB
testcase_19 AC 59 ms
65,408 KB
testcase_20 AC 66 ms
70,400 KB
testcase_21 AC 74 ms
77,312 KB
testcase_22 AC 65 ms
71,808 KB
testcase_23 AC 61 ms
68,096 KB
testcase_24 AC 69 ms
74,368 KB
testcase_25 AC 60 ms
66,688 KB
testcase_26 AC 66 ms
72,704 KB
testcase_27 AC 59 ms
65,664 KB
testcase_28 AC 75 ms
80,384 KB
testcase_29 AC 62 ms
68,352 KB
testcase_30 AC 71 ms
75,520 KB
testcase_31 AC 77 ms
82,560 KB
testcase_32 AC 76 ms
81,024 KB
testcase_33 AC 76 ms
80,768 KB
testcase_34 AC 68 ms
76,672 KB
testcase_35 AC 75 ms
82,448 KB
testcase_36 AC 45 ms
52,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

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

    x = 0
    cnt_inf = 0
    for a in A:
        if a == -1:
            cnt_inf += 1
        else:
            x ^= a
    if cnt_inf & 1:
        print("First")
    else:
        if x:
            print("First")
        else:
            print("Second")



if __name__ == '__main__':
    main()
0