結果

問題 No.715 集合と二人ゲーム
ユーザー lam6er
提出日時 2025-04-15 22:01:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 492 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 81,876 KB
実行使用メモリ 192,992 KB
最終ジャッジ日時 2025-04-15 22:02:39
合計ジャッジ時間 6,847 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if n == 0:
    print("Second")
    exit()

groups = []
current = [a[0]]
for num in a[1:]:
    if num - current[-1] <= 1:
        current.append(num)
    else:
        groups.append(len(current))
        current = [num]
groups.append(len(current))

xor_sum = 0
for length in groups:
    if length == 1 or length == 2:
        xor_sum ^= 1
    else:
        xor_sum ^= (length - 2) % 2

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