結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
59,328 KB
testcase_01 AC 42 ms
59,340 KB
testcase_02 AC 45 ms
61,720 KB
testcase_03 AC 44 ms
61,720 KB
testcase_04 AC 42 ms
59,580 KB
testcase_05 AC 43 ms
59,580 KB
testcase_06 AC 42 ms
59,580 KB
testcase_07 AC 64 ms
59,580 KB
testcase_08 AC 43 ms
59,580 KB
testcase_09 AC 43 ms
59,580 KB
testcase_10 AC 43 ms
59,580 KB
testcase_11 AC 43 ms
59,580 KB
testcase_12 AC 42 ms
59,580 KB
testcase_13 AC 44 ms
59,580 KB
testcase_14 AC 42 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 43 ms
59,580 KB
testcase_21 AC 44 ms
59,580 KB
testcase_22 AC 42 ms
59,580 KB
testcase_23 AC 42 ms
59,580 KB
testcase_24 AC 41 ms
59,580 KB
testcase_25 AC 63 ms
69,896 KB
testcase_26 AC 63 ms
69,896 KB
testcase_27 AC 44 ms
61,716 KB
testcase_28 AC 44 ms
61,716 KB
testcase_29 AC 42 ms
59,580 KB
testcase_30 AC 125 ms
131,372 KB
testcase_31 AC 71 ms
95,840 KB
testcase_32 AC 65 ms
90,388 KB
testcase_33 AC 108 ms
111,140 KB
testcase_34 AC 126 ms
131,380 KB
testcase_35 AC 120 ms
115,684 KB
testcase_36 AC 124 ms
124,412 KB
testcase_37 AC 78 ms
99,500 KB
testcase_38 AC 131 ms
141,508 KB
testcase_39 AC 52 ms
73,644 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 40 ms
59,960 KB
testcase_46 AC 981 ms
395,784 KB
testcase_47 AC 43 ms
59,960 KB
testcase_48 AC 41 ms
59,960 KB
testcase_49 AC 41 ms
59,960 KB
testcase_50 AC 983 ms
396,168 KB
testcase_51 AC 970 ms
396,168 KB
testcase_52 AC 967 ms
395,912 KB
testcase_53 AC 970 ms
395,784 KB
testcase_54 AC 944 ms
395,912 KB
testcase_55 AC 42 ms
59,960 KB
testcase_56 AC 555 ms
296,840 KB
testcase_57 AC 177 ms
136,968 KB
testcase_58 AC 36 ms
53,460 KB
testcase_59 AC 41 ms
59,960 KB
testcase_60 AC 42 ms
59,960 KB
testcase_61 AC 435 ms
205,320 KB
testcase_62 AC 506 ms
228,232 KB
testcase_63 AC 810 ms
338,312 KB
testcase_64 AC 256 ms
136,968 KB
testcase_65 AC 39 ms
59,380 KB
testcase_66 AC 36 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if n>5002:
  print('Yes')
  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