結果
| 問題 | No.715 集合と二人ゲーム |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 22:03:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 456 bytes |
| 記録 | |
| コンパイル時間 | 453 ms |
| コンパイル使用メモリ | 81,736 KB |
| 実行使用メモリ | 153,072 KB |
| 最終ジャッジ日時 | 2025-04-15 22:04:24 |
| 合計ジャッジ時間 | 6,517 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")
lam6er