結果

問題 No.2672 Subset Xor Sum
ユーザー PNJPNJ
提出日時 2024-03-15 21:41:58
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 466 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 452,152 KB
最終ジャッジ日時 2024-03-15 21:42:11
合計ジャッジ時間 12,457 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
60,056 KB
testcase_01 AC 45 ms
59,900 KB
testcase_02 AC 47 ms
60,780 KB
testcase_03 AC 46 ms
60,780 KB
testcase_04 AC 46 ms
60,936 KB
testcase_05 AC 46 ms
60,936 KB
testcase_06 AC 46 ms
60,732 KB
testcase_07 AC 46 ms
60,732 KB
testcase_08 AC 45 ms
60,732 KB
testcase_09 AC 47 ms
60,808 KB
testcase_10 AC 46 ms
60,808 KB
testcase_11 AC 45 ms
60,732 KB
testcase_12 AC 43 ms
60,732 KB
testcase_13 AC 44 ms
60,732 KB
testcase_14 AC 44 ms
60,732 KB
testcase_15 AC 44 ms
60,732 KB
testcase_16 AC 44 ms
60,732 KB
testcase_17 AC 44 ms
60,732 KB
testcase_18 AC 46 ms
60,732 KB
testcase_19 AC 44 ms
60,732 KB
testcase_20 AC 44 ms
60,732 KB
testcase_21 AC 45 ms
60,808 KB
testcase_22 AC 45 ms
60,808 KB
testcase_23 AC 44 ms
60,652 KB
testcase_24 AC 43 ms
60,652 KB
testcase_25 AC 66 ms
73,656 KB
testcase_26 AC 67 ms
73,656 KB
testcase_27 AC 51 ms
61,016 KB
testcase_28 AC 45 ms
61,016 KB
testcase_29 AC 44 ms
60,732 KB
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 AC 92 ms
116,792 KB
testcase_41 AC 131 ms
124,736 KB
testcase_42 AC 112 ms
110,836 KB
testcase_43 AC 136 ms
141,684 KB
testcase_44 AC 110 ms
110,840 KB
testcase_45 AC 42 ms
59,968 KB
testcase_46 AC 692 ms
451,760 KB
testcase_47 AC 41 ms
59,968 KB
testcase_48 AC 41 ms
59,968 KB
testcase_49 AC 40 ms
59,968 KB
testcase_50 AC 709 ms
452,152 KB
testcase_51 AC 683 ms
452,152 KB
testcase_52 AC 708 ms
451,840 KB
testcase_53 AC 696 ms
451,760 KB
testcase_54 AC 694 ms
451,840 KB
testcase_55 AC 43 ms
59,968 KB
testcase_56 AC 405 ms
331,124 KB
testcase_57 AC 167 ms
155,268 KB
testcase_58 AC 37 ms
53,460 KB
testcase_59 AC 42 ms
59,968 KB
testcase_60 AC 42 ms
59,968 KB
testcase_61 AC 320 ms
229,092 KB
testcase_62 AC 385 ms
265,948 KB
testcase_63 AC 605 ms
381,828 KB
testcase_64 AC 200 ms
156,440 KB
testcase_65 AC 40 ms
59,744 KB
testcase_66 AC 38 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().strip()
import bisect

def Map():
  return list(map(int,input().split()))

N = int(input())
A = Map()
g = 0
for a in A:
  g ^= a
if g != 0:
  print('No')
  exit()

M = 10000
dp = [0 for j in range((N+1)*M)]
for n in range(N-1):
  a = A[n]
  dp[(n+1)*M + a] = 1
  for j in range(M):
    if dp[n*M+j] == 1:
      dp[(n+1)*M+j] = 1
      dp[(n+1)*M + (a^j)] = 1
if dp[(N-1)*M + 0] == 1:
  print('Yes')
else:
  print('No')
0