結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー nbisconbisco
提出日時 2018-08-26 15:17:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 918 ms
コンパイル使用メモリ 10,840 KB
実行使用メモリ 13,540 KB
最終ジャッジ日時 2023-09-13 19:19:38
合計ジャッジ時間 1,494 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 14 ms
7,872 KB
testcase_02 AC 20 ms
9,272 KB
testcase_03 AC 17 ms
8,300 KB
testcase_04 AC 16 ms
7,824 KB
testcase_05 AC 22 ms
10,204 KB
testcase_06 AC 15 ms
7,804 KB
testcase_07 AC 29 ms
13,540 KB
testcase_08 AC 22 ms
10,688 KB
testcase_09 AC 22 ms
10,540 KB
testcase_10 AC 22 ms
10,596 KB
testcase_11 AC 23 ms
10,776 KB
testcase_12 AC 26 ms
13,336 KB
testcase_13 AC 15 ms
7,884 KB
testcase_14 AC 16 ms
8,288 KB
testcase_15 AC 24 ms
10,612 KB
testcase_16 AC 15 ms
8,296 KB
testcase_17 AC 21 ms
10,136 KB
testcase_18 AC 29 ms
13,464 KB
testcase_19 AC 20 ms
10,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = sorted(list(set([int(i) for i in input().strip().split(" ")])))
ok = [a[0]]
genset = set([a[0]])

for i in a[1:]:
    append_ok = True
    if i in genset:
        append_ok = False
    else:
        ok.append(i)
        genset.add(i)
        tmp = set([])
        for j in genset:
            tmp.add(i ^ j)
        genset |= set(tmp)
print(2**len(ok))
0