結果
問題 |
No.715 集合と二人ゲーム
|
ユーザー |
![]() |
提出日時 | 2025-06-12 12:55:11 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 561 bytes |
コンパイル時間 | 421 ms |
コンパイル使用メモリ | 82,888 KB |
実行使用メモリ | 157,400 KB |
最終ジャッジ日時 | 2025-06-12 13:00:17 |
合計ジャッジ時間 | 6,983 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 WA * 29 |
ソースコード
n, *rest = map(int, open(0).read().split()) a = rest[:n] a.sort() groups = [] if n == 0: print("Second") exit() current = a[0] current_length = 1 for num in a[1:]: if num == current + 1: current_length += 1 current = num else: groups.append(current_length) current = num current_length = 1 groups.append(current_length) xor_sum = 0 for k in groups: if k == 2: xor_sum ^= 1 elif k % 2 == 0: xor_sum ^= 0 else: xor_sum ^= 1 print("First" if xor_sum != 0 else "Second")