結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ntudantuda
提出日時 2023-12-28 12:52:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,441 ms / 5,000 ms
コード長 215 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 74,016 KB
最終ジャッジ日時 2023-12-28 12:53:05
合計ジャッジ時間 22,132 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,588 KB
testcase_01 AC 40 ms
53,588 KB
testcase_02 AC 45 ms
61,976 KB
testcase_03 AC 44 ms
59,720 KB
testcase_04 AC 40 ms
53,588 KB
testcase_05 AC 48 ms
65,308 KB
testcase_06 AC 40 ms
53,588 KB
testcase_07 AC 4,441 ms
74,016 KB
testcase_08 AC 2,376 ms
68,020 KB
testcase_09 AC 1,720 ms
68,020 KB
testcase_10 AC 2,015 ms
68,020 KB
testcase_11 AC 2,583 ms
70,176 KB
testcase_12 AC 51 ms
69,276 KB
testcase_13 AC 40 ms
53,588 KB
testcase_14 AC 43 ms
59,572 KB
testcase_15 AC 2,647 ms
70,176 KB
testcase_16 AC 44 ms
59,728 KB
testcase_17 AC 708 ms
68,104 KB
testcase_18 AC 3,415 ms
74,016 KB
testcase_19 AC 354 ms
67,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import copy
N = int(input())
A = set(map(int,input().split()))
Q = {0}

for a in A:
    Q2 = set()
    for q in Q:
        x = a^q
        if x not in Q:
            Q2.add(a^q)
    Q |= Q2
print(len(Q))

0