結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
58,800 KB
testcase_01 AC 43 ms
58,576 KB
testcase_02 AC 44 ms
58,744 KB
testcase_03 AC 42 ms
59,800 KB
testcase_04 AC 41 ms
59,940 KB
testcase_05 AC 43 ms
59,024 KB
testcase_06 AC 42 ms
58,744 KB
testcase_07 AC 778 ms
62,800 KB
testcase_08 AC 579 ms
62,884 KB
testcase_09 AC 415 ms
63,688 KB
testcase_10 AC 489 ms
63,612 KB
testcase_11 AC 626 ms
63,888 KB
testcase_12 AC 43 ms
59,288 KB
testcase_13 AC 41 ms
59,220 KB
testcase_14 AC 475 ms
62,460 KB
testcase_15 AC 645 ms
64,012 KB
testcase_16 AC 43 ms
60,536 KB
testcase_17 AC 180 ms
61,808 KB
testcase_18 AC 680 ms
62,588 KB
testcase_19 AC 121 ms
60,564 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]:
            dp[j^a] = 1
print(sum(dp))
0