結果

問題 No.2672 Subset Xor Sum
ユーザー mutualnsmutualns
提出日時 2024-03-16 14:23:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 854,756 KB
最終ジャッジ日時 2024-03-16 14:24:00
合計ジャッジ時間 8,544 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 42 ms
59,588 KB
testcase_03 AC 43 ms
59,592 KB
testcase_04 AC 43 ms
61,696 KB
testcase_05 AC 42 ms
61,696 KB
testcase_06 AC 41 ms
59,592 KB
testcase_07 AC 41 ms
59,588 KB
testcase_08 AC 43 ms
59,592 KB
testcase_09 AC 45 ms
61,696 KB
testcase_10 AC 42 ms
61,696 KB
testcase_11 AC 42 ms
59,588 KB
testcase_12 AC 42 ms
59,592 KB
testcase_13 AC 42 ms
59,592 KB
testcase_14 AC 42 ms
59,592 KB
testcase_15 AC 42 ms
59,592 KB
testcase_16 AC 41 ms
59,592 KB
testcase_17 AC 41 ms
59,592 KB
testcase_18 AC 42 ms
59,588 KB
testcase_19 AC 43 ms
59,592 KB
testcase_20 AC 42 ms
59,588 KB
testcase_21 AC 42 ms
59,596 KB
testcase_22 AC 42 ms
59,596 KB
testcase_23 AC 41 ms
59,592 KB
testcase_24 AC 42 ms
59,592 KB
testcase_25 AC 138 ms
97,448 KB
testcase_26 AC 137 ms
97,448 KB
testcase_27 AC 43 ms
64,136 KB
testcase_28 AC 43 ms
64,136 KB
testcase_29 AC 42 ms
59,592 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 93 ms
115,584 KB
testcase_41 AC 122 ms
124,272 KB
testcase_42 AC 111 ms
110,264 KB
testcase_43 AC 134 ms
141,348 KB
testcase_44 AC 109 ms
110,964 KB
testcase_45 AC 41 ms
59,960 KB
testcase_46 MLE -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))

if n>5002:
	print('No')
	exit()
	

s=a[0]

for i in range(1,n):
	s^=a[i]
	
if s!=0:
	print('No')
	exit()
	
dp=[[set(),a[0]] for _ in range(n)]

for i in range(n-1):
	keep=set()
	keep.add(dp[i][1])
	for j in dp[i][0]:
	  keep.add(j)
	  keep.add(j^a[i+1])
	keep.add(a[i+1])
	dp[i+1][0]=keep
	dp[i+1][1]=dp[i][1]^a[i+1]
	
if 0 in dp[-1][0]:
	print('Yes')
else:
	print('No')
0