結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ntudantuda
提出日時 2023-12-28 12:52:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,135 ms / 5,000 ms
コード長 215 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 82,208 KB
実行使用メモリ 74,720 KB
最終ジャッジ日時 2024-09-27 15:43:49
合計ジャッジ時間 20,689 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
54,372 KB
testcase_01 AC 43 ms
53,700 KB
testcase_02 AC 51 ms
62,272 KB
testcase_03 AC 48 ms
61,340 KB
testcase_04 AC 43 ms
53,472 KB
testcase_05 AC 51 ms
64,528 KB
testcase_06 AC 43 ms
54,372 KB
testcase_07 AC 4,135 ms
74,720 KB
testcase_08 AC 2,233 ms
69,208 KB
testcase_09 AC 1,612 ms
67,788 KB
testcase_10 AC 1,885 ms
68,748 KB
testcase_11 AC 2,404 ms
68,908 KB
testcase_12 AC 53 ms
69,484 KB
testcase_13 AC 42 ms
53,648 KB
testcase_14 AC 46 ms
59,596 KB
testcase_15 AC 2,470 ms
69,944 KB
testcase_16 AC 48 ms
60,420 KB
testcase_17 AC 648 ms
68,544 KB
testcase_18 AC 3,195 ms
74,228 KB
testcase_19 AC 342 ms
67,608 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