結果

問題 No.2044 Infinite Nim
ユーザー ikomaikoma
提出日時 2022-08-19 23:03:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 325 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 88,704 KB
最終ジャッジ日時 2024-04-17 01:41:47
合計ジャッジ時間 4,157 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
53,504 KB
testcase_01 AC 51 ms
53,760 KB
testcase_02 AC 52 ms
53,504 KB
testcase_03 AC 51 ms
53,248 KB
testcase_04 AC 47 ms
53,504 KB
testcase_05 AC 52 ms
53,248 KB
testcase_06 AC 48 ms
53,120 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 48 ms
53,248 KB
testcase_10 AC 48 ms
53,248 KB
testcase_11 AC 47 ms
53,248 KB
testcase_12 AC 49 ms
53,376 KB
testcase_13 AC 81 ms
77,184 KB
testcase_14 AC 72 ms
70,912 KB
testcase_15 WA -
testcase_16 AC 74 ms
70,528 KB
testcase_17 AC 101 ms
85,632 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 88 ms
76,800 KB
testcase_21 WA -
testcase_22 AC 82 ms
75,776 KB
testcase_23 AC 74 ms
71,040 KB
testcase_24 AC 99 ms
85,632 KB
testcase_25 AC 83 ms
74,880 KB
testcase_26 AC 102 ms
85,376 KB
testcase_27 AC 74 ms
69,120 KB
testcase_28 AC 107 ms
88,704 KB
testcase_29 AC 93 ms
78,208 KB
testcase_30 AC 92 ms
80,640 KB
testcase_31 AC 96 ms
83,584 KB
testcase_32 AC 97 ms
83,328 KB
testcase_33 AC 95 ms
83,584 KB
testcase_34 AC 84 ms
80,256 KB
testcase_35 AC 96 ms
86,912 KB
testcase_36 AC 51 ms
53,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
N=int(input())
A=list(map(int,input().split()))
A.sort()
from collections import Counter
cnt = Counter(A)
cntInf = cnt[-1]
if cntInf>0:
    print("First" if cntInf%2==1 else "Second")
else:
    xor = 0
    for a in A[cntInf:]:
        xor ^= a
    print("First" if xor!=0 else "Second")
0