結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー soisusoisu
提出日時 2021-09-20 10:30:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 243 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 86,784 KB
実行使用メモリ 76,620 KB
最終ジャッジ日時 2023-09-15 08:59:06
合計ジャッジ時間 10,259 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
75,852 KB
testcase_01 AC 79 ms
75,868 KB
testcase_02 AC 83 ms
75,952 KB
testcase_03 AC 80 ms
75,844 KB
testcase_04 AC 79 ms
76,000 KB
testcase_05 AC 83 ms
75,896 KB
testcase_06 AC 82 ms
76,008 KB
testcase_07 WA -
testcase_08 AC 1,051 ms
76,612 KB
testcase_09 AC 741 ms
76,596 KB
testcase_10 AC 878 ms
76,380 KB
testcase_11 AC 1,130 ms
76,600 KB
testcase_12 WA -
testcase_13 AC 77 ms
75,912 KB
testcase_14 AC 581 ms
76,520 KB
testcase_15 AC 1,170 ms
76,572 KB
testcase_16 AC 80 ms
75,904 KB
testcase_17 AC 320 ms
76,620 KB
testcase_18 WA -
testcase_19 AC 205 ms
76,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

Max=2**14+1
dp=[False]*Max
dp[0]=True

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

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