結果

問題 No.715 集合と二人ゲーム
ユーザー lam6er
提出日時 2025-04-16 15:43:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 545 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 81,904 KB
実行使用メモリ 157,208 KB
最終ジャッジ日時 2025-04-16 15:46:35
合計ジャッジ時間 7,203 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

n, *rest = map(int, open(0).read().split())
a = rest[:n]
a.sort()

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

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

xor_sum = 0
for m in groups:
    if m % 2 == 0:
        xor_sum ^= 0
    else:
        if m % 3 == 0:
            xor_sum ^= 2
        else:
            xor_sum ^= 1

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