結果

問題 No.2672 Subset Xor Sum
ユーザー 👑 timitimi
提出日時 2024-03-15 21:44:02
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 400 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 142,024 KB
最終ジャッジ日時 2024-03-15 21:44:09
合計ジャッジ時間 6,562 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
59,512 KB
testcase_01 AC 40 ms
59,512 KB
testcase_02 AC 42 ms
59,640 KB
testcase_03 AC 41 ms
59,640 KB
testcase_04 AC 41 ms
59,640 KB
testcase_05 AC 42 ms
59,640 KB
testcase_06 AC 40 ms
59,640 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,640 KB
testcase_24 AC 41 ms
59,640 KB
testcase_25 AC 36 ms
53,460 KB
testcase_26 AC 36 ms
53,460 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 41 ms
59,640 KB
testcase_30 AC 148 ms
131,896 KB
testcase_31 AC 74 ms
96,352 KB
testcase_32 AC 72 ms
90,908 KB
testcase_33 AC 114 ms
111,136 KB
testcase_34 AC 132 ms
131,908 KB
testcase_35 AC 121 ms
116,204 KB
testcase_36 AC 126 ms
124,940 KB
testcase_37 AC 80 ms
102,172 KB
testcase_38 AC 139 ms
142,024 KB
testcase_39 AC 54 ms
76,288 KB
testcase_40 AC 94 ms
116,576 KB
testcase_41 AC 122 ms
124,940 KB
testcase_42 AC 111 ms
110,824 KB
testcase_43 AC 131 ms
141,884 KB
testcase_44 AC 107 ms
110,832 KB
testcase_45 AC 40 ms
59,956 KB
testcase_46 RE -
testcase_47 AC 39 ms
59,956 KB
testcase_48 AC 40 ms
59,956 KB
testcase_49 AC 39 ms
59,956 KB
testcase_50 RE -
testcase_51 AC 41 ms
62,084 KB
testcase_52 AC 40 ms
62,084 KB
testcase_53 RE -
testcase_54 RE -
testcase_55 AC 40 ms
59,956 KB
testcase_56 AC 49 ms
62,096 KB
testcase_57 AC 43 ms
62,240 KB
testcase_58 AC 35 ms
53,460 KB
testcase_59 AC 39 ms
59,956 KB
testcase_60 AC 39 ms
59,956 KB
testcase_61 RE -
testcase_62 RE -
testcase_63 AC 40 ms
59,956 KB
testcase_64 RE -
testcase_65 WA -
testcase_66 AC 35 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))

c=0
for a in A:
  c^=a 

if c!=0:
  print('No')
  exit()
if len(A)!=len(set(A)):
  print('Yes')
  exit()

dp=[0]*5001 
f=0
for j in range(N):
  a=A[j]
  ndp=[0]*5001
  for i in range(5001):
    if dp[i]==1:
      ndp[i]=1
      ndp[i^a]=1 
  dp=ndp 
  dp[a]=1
  if dp[0]==1 and j!=N-1:
    f=1
    break 
if f==1:
  print('Yes')
else:
  print('No')

0