結果
問題 | No.2895 Zero XOR Subset |
ユーザー |
![]() |
提出日時 | 2024-11-07 22:46:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 136 ms / 2,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 106,512 KB |
最終ジャッジ日時 | 2024-11-07 22:46:38 |
合計ジャッジ時間 | 6,350 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 35 |
ソースコード
N=int(input())A=list(map(int,input().split()))B=[];C=[];p=1for i in range(min(N,70)):B.append(A[i])C.append(p)p*=2p,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^=yif 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^=bDD.append((x,y))DD.append((a,b))D=DDprint(-1)