結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
59,372 KB
testcase_01 AC 41 ms
59,380 KB
testcase_02 AC 44 ms
59,580 KB
testcase_03 AC 43 ms
59,580 KB
testcase_04 AC 43 ms
59,580 KB
testcase_05 AC 44 ms
59,580 KB
testcase_06 AC 43 ms
59,580 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 42 ms
59,580 KB
testcase_24 AC 52 ms
59,580 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 42 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 89 ms
115,560 KB
testcase_41 AC 128 ms
124,300 KB
testcase_42 AC 111 ms
110,316 KB
testcase_43 AC 133 ms
141,368 KB
testcase_44 AC 116 ms
110,836 KB
testcase_45 AC 41 ms
59,960 KB
testcase_46 RE -
testcase_47 AC 41 ms
59,960 KB
testcase_48 AC 42 ms
59,960 KB
testcase_49 AC 42 ms
59,960 KB
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 AC 41 ms
59,960 KB
testcase_56 AC 391 ms
205,192 KB
testcase_57 AC 172 ms
113,928 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 RE -
testcase_62 RE -
testcase_63 RE -
testcase_64 RE -
testcase_65 AC 40 ms
57,300 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]*5001 for _ in range(n)]
x=a[0]

for i in range(n-1):
  dp[i+1][x]=1
  for j in range(5001):
    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