結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ああいいああいい
提出日時 2021-12-24 15:18:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,042 ms / 5,000 ms
コード長 218 bytes
コンパイル時間 786 ms
コンパイル使用メモリ 81,832 KB
実行使用メモリ 62,664 KB
最終ジャッジ日時 2023-10-19 17:26:25
合計ジャッジ時間 7,681 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
59,760 KB
testcase_01 AC 43 ms
59,760 KB
testcase_02 AC 44 ms
59,956 KB
testcase_03 AC 44 ms
59,956 KB
testcase_04 AC 43 ms
59,760 KB
testcase_05 AC 44 ms
59,956 KB
testcase_06 AC 43 ms
59,760 KB
testcase_07 AC 1,042 ms
62,664 KB
testcase_08 AC 726 ms
62,664 KB
testcase_09 AC 513 ms
62,664 KB
testcase_10 AC 610 ms
62,664 KB
testcase_11 AC 787 ms
62,664 KB
testcase_12 AC 46 ms
59,960 KB
testcase_13 AC 41 ms
57,144 KB
testcase_14 AC 329 ms
62,664 KB
testcase_15 AC 813 ms
62,664 KB
testcase_16 AC 45 ms
59,956 KB
testcase_17 AC 215 ms
62,664 KB
testcase_18 AC 885 ms
62,664 KB
testcase_19 AC 146 ms
60,416 KB
権限があれば一括ダウンロードができます

ソースコード

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