結果

問題 No.2672 Subset Xor Sum
ユーザー mutualnsmutualns
提出日時 2024-03-16 14:27:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 396,168 KB
最終ジャッジ日時 2024-03-16 14:27:43
合計ジャッジ時間 14,808 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
59,332 KB
testcase_01 AC 41 ms
59,340 KB
testcase_02 AC 44 ms
61,720 KB
testcase_03 AC 44 ms
61,720 KB
testcase_04 AC 43 ms
59,580 KB
testcase_05 AC 44 ms
59,580 KB
testcase_06 AC 42 ms
59,580 KB
testcase_07 AC 43 ms
59,580 KB
testcase_08 AC 43 ms
59,580 KB
testcase_09 AC 44 ms
59,580 KB
testcase_10 AC 43 ms
59,580 KB
testcase_11 AC 43 ms
59,580 KB
testcase_12 AC 43 ms
59,580 KB
testcase_13 AC 43 ms
59,580 KB
testcase_14 AC 43 ms
59,580 KB
testcase_15 AC 43 ms
59,580 KB
testcase_16 AC 43 ms
59,580 KB
testcase_17 AC 43 ms
59,580 KB
testcase_18 AC 44 ms
59,580 KB
testcase_19 AC 43 ms
59,580 KB
testcase_20 AC 44 ms
59,580 KB
testcase_21 AC 43 ms
59,580 KB
testcase_22 AC 43 ms
59,580 KB
testcase_23 AC 43 ms
59,580 KB
testcase_24 AC 43 ms
59,580 KB
testcase_25 AC 67 ms
69,896 KB
testcase_26 AC 65 ms
69,896 KB
testcase_27 AC 47 ms
61,716 KB
testcase_28 AC 45 ms
61,716 KB
testcase_29 AC 45 ms
59,580 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 91 ms
115,568 KB
testcase_41 AC 126 ms
124,288 KB
testcase_42 AC 115 ms
110,332 KB
testcase_43 AC 138 ms
141,360 KB
testcase_44 AC 113 ms
110,836 KB
testcase_45 AC 42 ms
59,960 KB
testcase_46 AC 961 ms
395,784 KB
testcase_47 AC 43 ms
59,960 KB
testcase_48 AC 43 ms
59,960 KB
testcase_49 AC 43 ms
59,960 KB
testcase_50 AC 965 ms
396,168 KB
testcase_51 AC 979 ms
396,168 KB
testcase_52 AC 982 ms
395,912 KB
testcase_53 AC 971 ms
395,784 KB
testcase_54 AC 990 ms
395,912 KB
testcase_55 AC 42 ms
59,960 KB
testcase_56 AC 544 ms
296,840 KB
testcase_57 AC 182 ms
136,968 KB
testcase_58 AC 38 ms
53,460 KB
testcase_59 AC 41 ms
59,960 KB
testcase_60 AC 41 ms
59,960 KB
testcase_61 AC 456 ms
205,320 KB
testcase_62 AC 508 ms
228,232 KB
testcase_63 AC 814 ms
338,312 KB
testcase_64 AC 258 ms
136,968 KB
testcase_65 AC 40 ms
59,380 KB
testcase_66 AC 37 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

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=[[0]*(1<<13) for _ in range(n)]
x=a[0]

for i in range(n-1):
  dp[i+1][x]=1
  for j in range(1<<13):
    if dp[i][j]:
      dp[i+1][j]=1
      dp[i+1][a[i+1]^j]=1
  x^=a[i+1]
  
if dp[-1][0]:
  print('Yes')
else:
  print('No')
0