結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー ntuda
提出日時 2025-01-23 19:47:28
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 337 bytes
コンパイル時間 700 ms
コンパイル使用メモリ 82,216 KB
実行使用メモリ 133,520 KB
最終ジャッジ日時 2025-01-23 19:47:36
合計ジャッジ時間 6,869 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 3 RE * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
cnt = 0
for i in reversed(range(61)):
    B = []
    tp = 1 << i
    A = sorted(list(set(A)))
    if A[-1] >= tp:
        cnt += 1
        a = A.pop()
    while A and A[-1] >= tp:
        x = A.pop() ^ a
        if x != 0:
            B.append(A.pop() ^ a)
    A += B
print(pow(2,cnt))
0