結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ronpooronpoo
提出日時 2023-08-23 17:22:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,594 ms / 5,000 ms
コード長 221 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 86,824 KB
実行使用メモリ 76,572 KB
最終ジャッジ日時 2023-08-23 17:22:41
合計ジャッジ時間 11,053 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
75,948 KB
testcase_01 AC 75 ms
75,524 KB
testcase_02 AC 76 ms
75,960 KB
testcase_03 AC 74 ms
76,036 KB
testcase_04 AC 73 ms
75,632 KB
testcase_05 AC 75 ms
75,728 KB
testcase_06 AC 72 ms
75,656 KB
testcase_07 AC 1,594 ms
76,348 KB
testcase_08 AC 1,036 ms
76,344 KB
testcase_09 AC 713 ms
76,356 KB
testcase_10 AC 874 ms
76,372 KB
testcase_11 AC 1,118 ms
76,372 KB
testcase_12 AC 75 ms
75,980 KB
testcase_13 AC 72 ms
75,552 KB
testcase_14 AC 398 ms
76,416 KB
testcase_15 AC 1,131 ms
76,572 KB
testcase_16 AC 75 ms
76,060 KB
testcase_17 AC 308 ms
76,252 KB
testcase_18 AC 1,327 ms
76,540 KB
testcase_19 AC 184 ms
76,228 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