結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ああいいああいい
提出日時 2022-03-17 23:48:32
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 219 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 82,584 KB
実行使用メモリ 79,832 KB
最終ジャッジ日時 2024-04-09 22:07:03
合計ジャッジ時間 6,211 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
59,664 KB
testcase_01 AC 40 ms
59,872 KB
testcase_02 AC 40 ms
62,420 KB
testcase_03 AC 37 ms
60,456 KB
testcase_04 AC 36 ms
59,772 KB
testcase_05 AC 37 ms
62,168 KB
testcase_06 AC 35 ms
59,932 KB
testcase_07 RE -
testcase_08 AC 736 ms
79,232 KB
testcase_09 AC 530 ms
78,512 KB
testcase_10 AC 620 ms
79,060 KB
testcase_11 AC 807 ms
79,832 KB
testcase_12 RE -
testcase_13 AC 35 ms
58,248 KB
testcase_14 AC 292 ms
79,708 KB
testcase_15 AC 842 ms
79,556 KB
testcase_16 AC 38 ms
60,776 KB
testcase_17 AC 223 ms
76,800 KB
testcase_18 RE -
testcase_19 AC 136 ms
76,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

C = 1 << 14
dp = [0] * (C + 1)
dp[0] = 1
for a in A:
    nx = dp.copy()
    for i in range(C+1):
        if dp[i]:
            nx[i^a] = 1
    dp = nx
print(sum(dp))
0