結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー TawaraTawara
提出日時 2015-08-27 18:42:58
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 231 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 16,312 KB
最終ジャッジ日時 2023-09-25 18:55:24
合計ジャッジ時間 6,868 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
16,312 KB
testcase_01 AC 11 ms
6,196 KB
testcase_02 AC 24 ms
7,160 KB
testcase_03 AC 14 ms
6,276 KB
testcase_04 AC 12 ms
6,164 KB
testcase_05 AC 34 ms
8,384 KB
testcase_06 AC 13 ms
6,080 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy as dcp
N = int(raw_input())
A = map(int,raw_input().split())
N = len(A)
dp = {0}
for i in range(N):
	tmp_dp = dcp(dp)
	if A[i] not in tmp_dp:
		for v in dp:
			tmp_dp.add(v^A[i])
	dp = tmp_dp
print len(dp)
0