結果

問題 No.183 たのしい排他的論理和(EASY)
コンテスト
ユーザー 学ぶマン
提出日時 2025-10-28 21:03:23
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 324 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 82,708 KB
実行使用メモリ 717,420 KB
最終ジャッジ日時 2025-10-28 21:03:51
合計ジャッジ時間 27,561 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 RE * 1 MLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

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

limit = 2**14
DP = [[False] * (limit + 1) for _ in range(N + 1)]
DP[0][0] = True

for i in range(N):
    a = A[i]
    for j in range(limit + 1):
        if DP[i][j]:
            DP[i + 1][j] = True
            DP[i + 1][j ^ a] = True

ans = DP[-1].count(True)
print(ans)
0