結果
| 問題 |
No.2895 Zero XOR Subset
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-25 22:11:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 145 ms / 2,000 ms |
| コード長 | 509 bytes |
| コンパイル時間 | 617 ms |
| コンパイル使用メモリ | 82,352 KB |
| 実行使用メモリ | 106,892 KB |
| 最終ジャッジ日時 | 2025-02-25 22:12:07 |
| 合計ジャッジ時間 | 5,968 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 |
ソースコード
N=int(input())
A=list(map(int,input().split()))
B=[];C=[];p=1
for i in range(min(N,70)):
B.append(A[i])
C.append(p)
p*=2
p,q=0,0;D=[]
for i in range(min(N,70)):
a,b=B[i],C[i]
for x,y in D:
if a^x<a:
a^=x;b^=y
if a==0:
ans=[]
s=str(bin(b))
for j in range(len(s)-2):
if s[-1-j]=='1':
ans.append(j+1)
print(len(ans))
print(*ans)
exit()
DD=[]
for x,y in D:
if x^a<x:
x^=a;y^=b
DD.append((x,y))
DD.append((a,b))
D=DD
print(-1)