結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー 👑 KazunKazun
提出日時 2020-11-13 15:53:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 474 ms / 5,000 ms
コード長 175 bytes
コンパイル時間 906 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 76,808 KB
最終ジャッジ日時 2023-09-30 02:08:27
合計ジャッジ時間 5,427 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,252 KB
testcase_01 AC 68 ms
71,196 KB
testcase_02 AC 73 ms
75,956 KB
testcase_03 AC 75 ms
75,952 KB
testcase_04 AC 73 ms
76,220 KB
testcase_05 AC 76 ms
76,036 KB
testcase_06 AC 75 ms
75,984 KB
testcase_07 AC 435 ms
76,720 KB
testcase_08 AC 429 ms
76,336 KB
testcase_09 AC 324 ms
76,744 KB
testcase_10 AC 366 ms
76,808 KB
testcase_11 AC 457 ms
76,572 KB
testcase_12 AC 78 ms
75,936 KB
testcase_13 AC 69 ms
71,248 KB
testcase_14 AC 76 ms
76,328 KB
testcase_15 AC 474 ms
76,572 KB
testcase_16 AC 77 ms
76,016 KB
testcase_17 AC 166 ms
76,740 KB
testcase_18 AC 419 ms
76,540 KB
testcase_19 AC 136 ms
76,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

T=1<<(max(A)-1).bit_length()
DP=[0]*(2*T)
DP[0]=1

for a in A:
    for i in range(2*T):
        DP[i^a]|=DP[i]
print(sum(DP))
0