結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー tnodinotnodino
提出日時 2022-07-07 17:55:27
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 255 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 848,092 KB
最終ジャッジ日時 2023-08-26 04:44:34
合計ジャッジ時間 2,885 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
76,704 KB
testcase_01 AC 71 ms
77,700 KB
testcase_02 AC 75 ms
79,636 KB
testcase_03 AC 77 ms
79,096 KB
testcase_04 AC 69 ms
77,000 KB
testcase_05 AC 75 ms
79,960 KB
testcase_06 AC 73 ms
77,804 KB
testcase_07 MLE -
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 #

M = 2**15
N = int(input())
A = list(map(int,input().split()))
DP = [[0] * (M+1) for _ in range(N+1)]
DP[0][0] = 1
for i in range(N):
    for j in range(M+1):
        if DP[i][j]:
            DP[i+1][j] = 1
            DP[i+1][j^A[i]] = 1
print(sum(DP[N]))
0