結果
問題 |
No.715 集合と二人ゲーム
|
ユーザー |
![]() |
提出日時 | 2025-06-12 18:08:05 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 323 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 154,800 KB |
最終ジャッジ日時 | 2025-06-12 18:10:04 |
合計ジャッジ時間 | 6,593 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 WA * 31 |
ソースコード
n = int(input()) a = list(map(int, input().split())) a.sort() count = 0 current_length = 1 for i in range(1, n): if a[i] == a[i-1] + 1: current_length += 1 else: if current_length % 2 == 1: count += 1 current_length = 1 # Check the last group if current_length % 2 == 1: count += 1 print("First" if count % 2 == 1 else "Second")