結果
| 問題 | No.715 集合と二人ゲーム |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 22:00:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 492 bytes |
| 記録 | |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 81,520 KB |
| 実行使用メモリ | 192,780 KB |
| 最終ジャッジ日時 | 2025-04-15 22:01:18 |
| 合計ジャッジ時間 | 8,032 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 WA * 29 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 0:
print("Second")
exit()
groups = []
current = [a[0]]
for num in a[1:]:
if num - current[-1] <= 1:
current.append(num)
else:
groups.append(len(current))
current = [num]
groups.append(len(current))
xor_sum = 0
for length in groups:
if length == 1 or length == 2:
xor_sum ^= 1
else:
xor_sum ^= (length - 2) % 2
print("First" if xor_sum != 0 else "Second")
lam6er