結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ああいいああいい
提出日時 2022-03-17 23:58:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 701 ms / 5,000 ms
コード長 193 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 64,156 KB
最終ジャッジ日時 2024-04-09 22:16:50
合計ジャッジ時間 5,937 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
58,292 KB
testcase_01 AC 41 ms
58,360 KB
testcase_02 AC 41 ms
60,276 KB
testcase_03 AC 39 ms
59,944 KB
testcase_04 AC 41 ms
59,148 KB
testcase_05 AC 42 ms
59,916 KB
testcase_06 AC 39 ms
58,776 KB
testcase_07 AC 701 ms
63,468 KB
testcase_08 AC 531 ms
63,440 KB
testcase_09 AC 370 ms
62,780 KB
testcase_10 AC 453 ms
61,896 KB
testcase_11 AC 566 ms
64,156 KB
testcase_12 AC 43 ms
60,808 KB
testcase_13 AC 38 ms
59,040 KB
testcase_14 AC 461 ms
62,172 KB
testcase_15 AC 594 ms
63,624 KB
testcase_16 AC 42 ms
60,300 KB
testcase_17 AC 162 ms
61,332 KB
testcase_18 AC 617 ms
63,800 KB
testcase_19 AC 115 ms
61,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

C = 1 << 15
dp = [0] * (C + 1)
dp[0] = 1
for a in A:
    for j in range(C+1):
        if dp[j] == 1:
            dp[j^a] = 1
print(sum(dp))
0