結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ああいいああいい
提出日時 2021-12-05 22:57:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 277 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 13,144 KB
最終ジャッジ日時 2023-09-21 15:02:17
合計ジャッジ時間 9,745 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,232 KB
testcase_01 AC 23 ms
8,168 KB
testcase_02 AC 36 ms
8,080 KB
testcase_03 AC 34 ms
8,264 KB
testcase_04 AC 22 ms
8,276 KB
testcase_05 AC 42 ms
8,224 KB
testcase_06 AC 25 ms
8,096 KB
testcase_07 RE -
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))

dp = [0] * (2 ** 14 + 1)
dp[0] = 1
dp[A[0]] = 1
for i in range(1,N):
    for j in range(2 ** 14 + 1):
        if dp[j]:
            dp[j ^ A[i]] = 1
count = 0
for i in range(2 ** 14 +1):
    if dp[i]:count += 1
print(count)
0