結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー nohakai3nohakai3
提出日時 2022-10-25 20:02:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 706 ms / 5,000 ms
コード長 216 bytes
コンパイル時間 683 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 76,992 KB
最終ジャッジ日時 2023-09-16 17:30:05
合計ジャッジ時間 8,192 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,308 KB
testcase_01 AC 76 ms
76,328 KB
testcase_02 AC 78 ms
76,368 KB
testcase_03 AC 80 ms
76,200 KB
testcase_04 AC 77 ms
76,200 KB
testcase_05 AC 81 ms
76,204 KB
testcase_06 AC 79 ms
76,292 KB
testcase_07 AC 623 ms
76,992 KB
testcase_08 AC 621 ms
76,928 KB
testcase_09 AC 450 ms
76,908 KB
testcase_10 AC 533 ms
76,848 KB
testcase_11 AC 671 ms
76,768 KB
testcase_12 AC 78 ms
76,292 KB
testcase_13 AC 76 ms
76,228 KB
testcase_14 AC 706 ms
76,828 KB
testcase_15 AC 699 ms
76,932 KB
testcase_16 AC 80 ms
76,140 KB
testcase_17 AC 218 ms
76,820 KB
testcase_18 AC 613 ms
76,848 KB
testcase_19 AC 148 ms
76,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
dp=[0]*(2**15)
dp[0]=1
for i in range(n):
    for j in range(2**15):
        dp[a[i]^j]|=dp[j]

ans=0
for j in range(1<<15):
    if dp[j]==1:
        ans+=1

print(ans)
0