結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー qewqewqewqewqewqew
提出日時 2018-12-15 02:27:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 254 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 11,872 KB
実行使用メモリ 579,372 KB
最終ジャッジ日時 2023-10-25 10:41:23
合計ジャッジ時間 9,951 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 RE -
testcase_10 RE -
testcase_11 MLE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 MLE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(set(map(int, input().split())))
n = len(a)


dp = [[False]*(2**14+1) for i in range(n+1)]
dp[0][0] = True
for i in range(n):
    for k in range(2**14+1):
        dp[i+1][k] = dp[i][k] or dp[i][k^a[i]]
        
print(sum(dp[-1]))
0