結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
59,960 KB
testcase_01 AC 45 ms
59,828 KB
testcase_02 AC 45 ms
60,600 KB
testcase_03 AC 45 ms
60,600 KB
testcase_04 AC 45 ms
60,728 KB
testcase_05 AC 45 ms
60,728 KB
testcase_06 AC 43 ms
60,536 KB
testcase_07 AC 45 ms
60,536 KB
testcase_08 AC 43 ms
60,536 KB
testcase_09 AC 44 ms
60,600 KB
testcase_10 AC 43 ms
60,600 KB
testcase_11 AC 44 ms
60,536 KB
testcase_12 AC 43 ms
60,536 KB
testcase_13 AC 43 ms
60,536 KB
testcase_14 AC 44 ms
60,536 KB
testcase_15 AC 43 ms
60,536 KB
testcase_16 AC 42 ms
60,536 KB
testcase_17 AC 43 ms
60,536 KB
testcase_18 AC 44 ms
60,536 KB
testcase_19 AC 43 ms
60,536 KB
testcase_20 AC 43 ms
60,536 KB
testcase_21 AC 43 ms
60,600 KB
testcase_22 AC 43 ms
60,600 KB
testcase_23 AC 43 ms
60,472 KB
testcase_24 AC 43 ms
60,472 KB
testcase_25 AC 61 ms
71,524 KB
testcase_26 AC 62 ms
71,524 KB
testcase_27 AC 44 ms
60,792 KB
testcase_28 AC 44 ms
60,792 KB
testcase_29 AC 44 ms
60,536 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 91 ms
116,788 KB
testcase_41 AC 123 ms
124,740 KB
testcase_42 AC 112 ms
110,832 KB
testcase_43 AC 135 ms
141,680 KB
testcase_44 AC 110 ms
110,840 KB
testcase_45 AC 41 ms
59,968 KB
testcase_46 AC 630 ms
381,236 KB
testcase_47 AC 40 ms
59,968 KB
testcase_48 AC 41 ms
59,968 KB
testcase_49 AC 40 ms
59,968 KB
testcase_50 AC 642 ms
381,556 KB
testcase_51 AC 616 ms
381,556 KB
testcase_52 AC 643 ms
381,300 KB
testcase_53 AC 616 ms
381,236 KB
testcase_54 AC 641 ms
381,300 KB
testcase_55 AC 41 ms
59,968 KB
testcase_56 AC 351 ms
282,408 KB
testcase_57 AC 137 ms
138,476 KB
testcase_58 AC 37 ms
53,460 KB
testcase_59 AC 41 ms
59,968 KB
testcase_60 AC 40 ms
59,968 KB
testcase_61 AC 314 ms
198,952 KB
testcase_62 AC 339 ms
229,736 KB
testcase_63 AC 515 ms
323,940 KB
testcase_64 AC 208 ms
139,436 KB
testcase_65 AC 40 ms
59,572 KB
testcase_66 AC 35 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 = 8192
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(8192):
    if dp[n*M+j]:
      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