結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,920 KB
testcase_01 AC 78 ms
76,036 KB
testcase_02 AC 83 ms
76,148 KB
testcase_03 AC 83 ms
76,000 KB
testcase_04 AC 80 ms
76,132 KB
testcase_05 AC 85 ms
76,080 KB
testcase_06 AC 81 ms
76,000 KB
testcase_07 AC 2,055 ms
76,440 KB
testcase_08 AC 1,733 ms
76,460 KB
testcase_09 AC 1,211 ms
76,472 KB
testcase_10 AC 1,439 ms
76,424 KB
testcase_11 AC 1,864 ms
76,456 KB
testcase_12 AC 84 ms
76,060 KB
testcase_13 AC 77 ms
75,824 KB
testcase_14 AC 1,495 ms
76,624 KB
testcase_15 AC 1,929 ms
76,472 KB
testcase_16 AC 82 ms
76,044 KB
testcase_17 AC 491 ms
76,472 KB
testcase_18 AC 1,866 ms
76,440 KB
testcase_19 AC 292 ms
76,236 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):
        dp[j^A[i]]|=dp[j]

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