結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ああいいああいい
提出日時 2021-12-24 15:18:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 218 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 11,824 KB
実行使用メモリ 15,252 KB
最終ジャッジ日時 2023-10-19 17:25:57
合計ジャッジ時間 7,331 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
10,284 KB
testcase_01 AC 51 ms
10,284 KB
testcase_02 AC 70 ms
10,284 KB
testcase_03 AC 63 ms
10,284 KB
testcase_04 AC 41 ms
10,284 KB
testcase_05 AC 76 ms
10,284 KB
testcase_06 AC 51 ms
10,284 KB
testcase_07 TLE -
testcase_08 -- -
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] * ((1 << 15) + 1)
dp[0] = 1
dp[A[0]] = 1
for i in range(1,N):
    for j in range((1 << 15) + 1):
        if dp[j]:
            dp[j^A[i]] = 1
print(sum(dp))
0