結果
問題 |
No.715 集合と二人ゲーム
|
ユーザー |
![]() |
提出日時 | 2025-04-15 22:05:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 545 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 82,148 KB |
実行使用メモリ | 156,964 KB |
最終ジャッジ日時 | 2025-04-15 22:07:27 |
合計ジャッジ時間 | 6,200 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 WA * 28 |
ソースコード
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")