結果

問題 No.2672 Subset Xor Sum
ユーザー PNJPNJ
提出日時 2024-03-15 21:42:57
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 454 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 381,532 KB
最終ジャッジ日時 2024-03-15 21:43:14
合計ジャッジ時間 12,114 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
59,964 KB
testcase_01 AC 45 ms
59,832 KB
testcase_02 AC 46 ms
60,604 KB
testcase_03 AC 49 ms
60,604 KB
testcase_04 AC 45 ms
60,732 KB
testcase_05 AC 51 ms
60,732 KB
testcase_06 AC 46 ms
60,540 KB
testcase_07 AC 45 ms
60,540 KB
testcase_08 AC 45 ms
60,540 KB
testcase_09 AC 46 ms
60,604 KB
testcase_10 AC 46 ms
60,604 KB
testcase_11 AC 44 ms
60,540 KB
testcase_12 AC 47 ms
60,540 KB
testcase_13 AC 49 ms
60,540 KB
testcase_14 AC 44 ms
60,540 KB
testcase_15 AC 47 ms
60,540 KB
testcase_16 AC 45 ms
60,540 KB
testcase_17 AC 45 ms
60,540 KB
testcase_18 AC 45 ms
60,540 KB
testcase_19 AC 46 ms
60,540 KB
testcase_20 AC 49 ms
60,540 KB
testcase_21 AC 45 ms
60,604 KB
testcase_22 AC 46 ms
60,604 KB
testcase_23 AC 47 ms
60,476 KB
testcase_24 AC 44 ms
60,476 KB
testcase_25 AC 61 ms
69,436 KB
testcase_26 AC 62 ms
69,436 KB
testcase_27 AC 45 ms
60,796 KB
testcase_28 AC 49 ms
60,796 KB
testcase_29 AC 46 ms
60,540 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,588 KB
testcase_41 AC 132 ms
124,916 KB
testcase_42 AC 119 ms
110,836 KB
testcase_43 AC 140 ms
141,860 KB
testcase_44 AC 113 ms
110,836 KB
testcase_45 AC 42 ms
59,960 KB
testcase_46 AC 665 ms
381,212 KB
testcase_47 AC 46 ms
59,960 KB
testcase_48 AC 41 ms
59,960 KB
testcase_49 AC 41 ms
59,960 KB
testcase_50 AC 625 ms
381,532 KB
testcase_51 AC 656 ms
381,532 KB
testcase_52 AC 619 ms
381,276 KB
testcase_53 AC 646 ms
381,212 KB
testcase_54 AC 627 ms
381,276 KB
testcase_55 AC 42 ms
59,960 KB
testcase_56 AC 390 ms
282,384 KB
testcase_57 AC 146 ms
138,472 KB
testcase_58 AC 36 ms
53,460 KB
testcase_59 AC 41 ms
59,960 KB
testcase_60 AC 40 ms
59,960 KB
testcase_61 AC 296 ms
198,952 KB
testcase_62 AC 352 ms
229,736 KB
testcase_63 AC 518 ms
323,924 KB
testcase_64 AC 191 ms
139,432 KB
testcase_65 AC 42 ms
59,576 KB
testcase_66 AC 38 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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 = 1 << 13
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