結果
| 問題 |
No.715 集合と二人ゲーム
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 12:55:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 455 bytes |
| コンパイル時間 | 359 ms |
| コンパイル使用メモリ | 82,232 KB |
| 実行使用メモリ | 154,932 KB |
| 最終ジャッジ日時 | 2025-06-12 13:00:23 |
| 合計ジャッジ時間 | 6,141 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 WA * 28 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
a.sort()
xor = 0
current_length = 1
for i in range(1, n):
if a[i] == a[i-1] + 1:
current_length += 1
else:
# Calculate grundy for current group
grundy = 1 if (current_length % 3 == 0) else 0
xor ^= grundy
current_length = 1
# Process the last group
grundy = 1 if (current_length % 3 == 0) else 0
xor ^= grundy
print("First" if xor != 0 else "Second")
gew1fw