結果

問題 No.715 集合と二人ゲーム
ユーザー gew1fw
提出日時 2025-06-12 18:12:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 158,708 KB
最終ジャッジ日時 2025-06-12 18:13:50
合計ジャッジ時間 6,709 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
a.sort()

segments = []
if n == 0:
    print("Second")
    exit()

current = a[0]
count = 1
for num in a[1:]:
    if num == current + 1:
        count += 1
    else:
        segments.append(count)
        count = 1
    current = num
segments.append(count)

xor_sum = 0
for k in segments:
    xor_sum ^= (k % 2)

print("First" if xor_sum != 0 else "Second")
0