結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー soisusoisu
提出日時 2021-09-20 10:24:08
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 308 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 718,456 KB
最終ジャッジ日時 2023-09-15 08:58:47
合計ジャッジ時間 34,674 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
76,272 KB
testcase_01 AC 84 ms
76,200 KB
testcase_02 AC 90 ms
76,276 KB
testcase_03 AC 94 ms
76,272 KB
testcase_04 AC 84 ms
76,044 KB
testcase_05 AC 91 ms
76,108 KB
testcase_06 AC 88 ms
76,308 KB
testcase_07 MLE -
testcase_08 MLE -
testcase_09 AC 2,591 ms
467,916 KB
testcase_10 MLE -
testcase_11 MLE -
testcase_12 WA -
testcase_13 AC 80 ms
76,240 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 AC 87 ms
76,276 KB
testcase_17 AC 808 ms
206,076 KB
testcase_18 MLE -
testcase_19 AC 445 ms
138,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

Max=2**14+1
dp=[[False]*Max for i in range(N+1)]
dp[0][0]=True

for i in range(N):
    for j in range(Max):
        if j^A[i]<Max:
            dp[i+1][j^A[i]]|=dp[i][j]
        dp[i+1][j]|=dp[i][j]

ans=0
for i in range(Max):
    if dp[N][i]:ans+=1
print(ans)
0