結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー nbisco
提出日時 2018-08-26 15:17:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,096 KB
最終ジャッジ日時 2024-07-01 03:56:30
合計ジャッジ時間 1,605 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = sorted(list(set([int(i) for i in input().strip().split(" ")])))
ok = [a[0]]
genset = set([a[0]])

for i in a[1:]:
    append_ok = True
    if i in genset:
        append_ok = False
    else:
        ok.append(i)
        genset.add(i)
        tmp = set([])
        for j in genset:
            tmp.add(i ^ j)
        genset |= set(tmp)
print(2**len(ok))
0