結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー brthyyjpbrthyyjp
提出日時 2020-08-21 06:52:18
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 480 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 94,592 KB
最終ジャッジ日時 2024-04-21 22:25:26
合計ジャッジ時間 7,728 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
60,160 KB
testcase_01 AC 54 ms
61,440 KB
testcase_02 AC 53 ms
63,488 KB
testcase_03 AC 53 ms
62,848 KB
testcase_04 AC 51 ms
60,672 KB
testcase_05 AC 54 ms
63,616 KB
testcase_06 AC 50 ms
61,312 KB
testcase_07 RE -
testcase_08 AC 853 ms
92,672 KB
testcase_09 AC 613 ms
87,552 KB
testcase_10 AC 718 ms
89,728 KB
testcase_11 AC 922 ms
93,824 KB
testcase_12 RE -
testcase_13 AC 45 ms
59,008 KB
testcase_14 AC 353 ms
94,592 KB
testcase_15 AC 940 ms
94,208 KB
testcase_16 AC 52 ms
62,976 KB
testcase_17 AC 263 ms
80,640 KB
testcase_18 RE -
testcase_19 AC 165 ms
78,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

N = 2**14+1
dp = [0]*N
dp[0] = 1
import copy
for i, a in enumerate(A):
    temp = copy.copy(dp)
    for j in range(N):
        if dp[j] == 1:
            temp[j^a] = 1
    dp = copy.copy(temp)
#print(dp)
print(sum(dp))
0