結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー e-mon
提出日時 2015-04-16 23:34:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 283 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,060 KB
最終ジャッジ日時 2024-07-04 15:10:11
合計ジャッジ時間 6,797 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
dp = dict()
A = list(map(int,input().split()))
dp[0] = True

for a in A:
    tmp = dict()
    for i,value in dp.items():
        if i ^ a not in dp:
            tmp[i^a] = True
    dp.update(tmp)
print(len(dp.keys()))

0