結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ohanaohana
提出日時 2023-11-24 10:18:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,652 ms / 5,000 ms
コード長 217 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 62,636 KB
最終ジャッジ日時 2023-11-24 10:18:51
合計ジャッジ時間 10,483 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
59,784 KB
testcase_01 AC 42 ms
59,784 KB
testcase_02 AC 43 ms
60,040 KB
testcase_03 AC 43 ms
60,040 KB
testcase_04 AC 42 ms
59,784 KB
testcase_05 AC 43 ms
60,040 KB
testcase_06 AC 42 ms
59,784 KB
testcase_07 AC 1,652 ms
62,620 KB
testcase_08 AC 1,011 ms
62,620 KB
testcase_09 AC 731 ms
62,628 KB
testcase_10 AC 848 ms
62,624 KB
testcase_11 AC 1,100 ms
62,620 KB
testcase_12 AC 45 ms
60,040 KB
testcase_13 AC 41 ms
59,784 KB
testcase_14 AC 358 ms
62,616 KB
testcase_15 AC 1,156 ms
62,620 KB
testcase_16 AC 44 ms
60,040 KB
testcase_17 AC 288 ms
62,636 KB
testcase_18 AC 1,344 ms
62,620 KB
testcase_19 AC 158 ms
60,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

dp = [False] * (2**15 + 10)
dp[0] = True
for i in range(N):
    for j in range(2**15):
        if dp[j]:
            dp[A[i] ^ j] = True

ans = sum(dp)
print(ans)
0