結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー e-mon
提出日時 2015-04-17 13:24:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,247 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 72,788 KB
最終ジャッジ日時 2024-06-29 01:46:10
合計ジャッジ時間 20,542 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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