結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー brthyyjpbrthyyjp
提出日時 2020-08-21 06:50:26
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 299 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 716,992 KB
最終ジャッジ日時 2024-04-21 22:23:55
合計ジャッジ時間 16,151 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
59,440 KB
testcase_01 AC 50 ms
61,524 KB
testcase_02 AC 49 ms
61,536 KB
testcase_03 AC 48 ms
61,696 KB
testcase_04 AC 45 ms
60,160 KB
testcase_05 AC 54 ms
61,916 KB
testcase_06 AC 54 ms
60,544 KB
testcase_07 MLE -
testcase_08 MLE -
testcase_09 AC 1,226 ms
466,600 KB
testcase_10 MLE -
testcase_11 MLE -
testcase_12 RE -
testcase_13 AC 42 ms
58,240 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 AC 48 ms
61,684 KB
testcase_17 AC 470 ms
206,628 KB
testcase_18 MLE -
testcase_19 AC 259 ms
138,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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