結果
問題 |
No.715 集合と二人ゲーム
|
ユーザー |
![]() |
提出日時 | 2025-04-16 15:38:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 456 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 81,616 KB |
実行使用メモリ | 152,844 KB |
最終ジャッジ日時 | 2025-04-16 15:43:29 |
合計ジャッジ時間 | 6,380 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 WA * 31 |
ソースコード
n, *rest = map(int, open(0).read().split()) a = rest[:n] a.sort() segments = [] if n == 0: print("Second") exit() current_length = 1 for i in range(1, n): if a[i] == a[i-1] + 1: current_length += 1 else: segments.append(current_length) current_length = 1 segments.append(current_length) xor_sum = 0 for length in segments: if length % 2 == 1: xor_sum ^= 1 print("First" if xor_sum != 0 else "Second")