結果

問題 No.2044 Infinite Nim
ユーザー shotoyooshotoyoo
提出日時 2022-08-20 01:20:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 780 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 85,760 KB
最終ジャッジ日時 2024-04-17 12:06:50
合計ジャッジ時間 3,588 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
53,760 KB
testcase_01 AC 48 ms
53,760 KB
testcase_02 AC 48 ms
54,016 KB
testcase_03 AC 47 ms
54,016 KB
testcase_04 AC 47 ms
53,760 KB
testcase_05 AC 45 ms
53,888 KB
testcase_06 AC 47 ms
53,760 KB
testcase_07 AC 47 ms
54,016 KB
testcase_08 AC 46 ms
54,016 KB
testcase_09 AC 48 ms
54,016 KB
testcase_10 AC 47 ms
54,016 KB
testcase_11 AC 46 ms
53,888 KB
testcase_12 AC 48 ms
54,016 KB
testcase_13 AC 69 ms
73,344 KB
testcase_14 AC 67 ms
68,480 KB
testcase_15 AC 64 ms
67,712 KB
testcase_16 AC 62 ms
67,712 KB
testcase_17 AC 72 ms
75,776 KB
testcase_18 AC 60 ms
67,200 KB
testcase_19 AC 60 ms
67,584 KB
testcase_20 AC 65 ms
72,192 KB
testcase_21 AC 75 ms
78,976 KB
testcase_22 AC 67 ms
73,728 KB
testcase_23 AC 62 ms
69,888 KB
testcase_24 AC 69 ms
76,800 KB
testcase_25 AC 61 ms
69,504 KB
testcase_26 AC 70 ms
75,648 KB
testcase_27 AC 60 ms
68,736 KB
testcase_28 AC 75 ms
82,432 KB
testcase_29 AC 64 ms
71,808 KB
testcase_30 AC 70 ms
77,440 KB
testcase_31 AC 80 ms
83,328 KB
testcase_32 AC 79 ms
83,200 KB
testcase_33 AC 78 ms
83,328 KB
testcase_34 AC 73 ms
80,000 KB
testcase_35 AC 80 ms
85,760 KB
testcase_36 AC 45 ms
53,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input())
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

n = int(input())
a = list(map(int, input().split()))
c = 0
x = 0
for v in a:
    if v==-1:
        c += 1
    else:
        x ^= v
YES = "First"
NO = "Second"
if c%2:
    pans(1)
else:
    pans(x!=0)
0