結果
| 問題 |
No.2895 Zero XOR Subset
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-07-10 20:25:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 152 ms / 2,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 400 ms |
| コンパイル使用メモリ | 82,568 KB |
| 実行使用メモリ | 105,840 KB |
| 最終ジャッジ日時 | 2025-07-10 20:25:15 |
| 合計ジャッジ時間 | 7,395 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
B = []
BIT = []
for i in range(N):
bit = 1<<i
a = A[i]
for j in range(len(B)):
if a^B[j] < a:
a ^= B[j]
bit ^= BIT[j]
if a:
B.append(a)
BIT.append(bit)
else:
ans = []
for j in range(i+1):
if 1<<j & bit:
ans.append(j+1)
print(len(ans))
print(*ans)
break
else:
print(-1)
detteiuu