結果

問題 No.183 たのしい排他的論理和(EASY)
コンテスト
ユーザー ntuda
提出日時 2023-12-28 12:52:42
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 2,159 ms / 5,000 ms
コード長 215 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 194 ms
コンパイル使用メモリ 85,376 KB
実行使用メモリ 73,704 KB
最終ジャッジ日時 2026-04-14 10:23:09
合計ジャッジ時間 11,482 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from copy import copy
N = int(input())
A = set(map(int,input().split()))
Q = {0}

for a in A:
    Q2 = set()
    for q in Q:
        x = a^q
        if x not in Q:
            Q2.add(a^q)
    Q |= Q2
print(len(Q))

0