結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー soisusoisu
提出日時 2021-09-20 10:30:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,334 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 86,752 KB
実行使用メモリ 76,864 KB
最終ジャッジ日時 2023-09-15 08:59:25
合計ジャッジ時間 17,681 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
76,256 KB
testcase_01 AC 80 ms
76,220 KB
testcase_02 AC 85 ms
76,124 KB
testcase_03 AC 86 ms
76,120 KB
testcase_04 AC 78 ms
76,156 KB
testcase_05 AC 92 ms
76,296 KB
testcase_06 AC 82 ms
76,076 KB
testcase_07 AC 2,334 ms
76,732 KB
testcase_08 AC 1,855 ms
76,828 KB
testcase_09 AC 1,295 ms
76,820 KB
testcase_10 AC 1,544 ms
76,828 KB
testcase_11 AC 2,002 ms
76,604 KB
testcase_12 AC 87 ms
76,272 KB
testcase_13 AC 78 ms
75,940 KB
testcase_14 AC 1,442 ms
76,672 KB
testcase_15 AC 2,066 ms
76,588 KB
testcase_16 AC 85 ms
76,212 KB
testcase_17 AC 522 ms
76,604 KB
testcase_18 AC 2,080 ms
76,864 KB
testcase_19 AC 315 ms
76,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

Max=2**15
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