結果

問題 No.2672 Subset Xor Sum
ユーザー rlangevinrlangevin
提出日時 2024-03-15 21:53:06
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 447 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 279,832 KB
最終ジャッジ日時 2024-03-15 21:53:14
合計ジャッジ時間 7,965 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
66,528 KB
testcase_01 AC 43 ms
59,724 KB
testcase_02 AC 42 ms
59,724 KB
testcase_03 AC 47 ms
59,724 KB
testcase_04 AC 43 ms
59,724 KB
testcase_05 AC 44 ms
59,724 KB
testcase_06 AC 44 ms
59,724 KB
testcase_07 AC 43 ms
59,724 KB
testcase_08 AC 44 ms
59,724 KB
testcase_09 AC 43 ms
59,724 KB
testcase_10 AC 43 ms
59,724 KB
testcase_11 AC 43 ms
59,724 KB
testcase_12 AC 43 ms
59,724 KB
testcase_13 AC 43 ms
59,724 KB
testcase_14 AC 42 ms
59,724 KB
testcase_15 AC 42 ms
59,724 KB
testcase_16 AC 43 ms
59,724 KB
testcase_17 AC 42 ms
59,724 KB
testcase_18 AC 42 ms
59,724 KB
testcase_19 AC 42 ms
59,724 KB
testcase_20 AC 43 ms
59,724 KB
testcase_21 AC 43 ms
59,724 KB
testcase_22 AC 42 ms
59,724 KB
testcase_23 AC 43 ms
59,724 KB
testcase_24 AC 43 ms
59,724 KB
testcase_25 AC 113 ms
79,340 KB
testcase_26 AC 114 ms
79,340 KB
testcase_27 AC 43 ms
59,724 KB
testcase_28 AC 42 ms
59,724 KB
testcase_29 AC 43 ms
59,724 KB
testcase_30 AC 130 ms
131,908 KB
testcase_31 AC 72 ms
96,352 KB
testcase_32 AC 75 ms
90,908 KB
testcase_33 AC 112 ms
111,136 KB
testcase_34 AC 130 ms
131,916 KB
testcase_35 AC 119 ms
116,216 KB
testcase_36 AC 127 ms
124,956 KB
testcase_37 AC 79 ms
102,172 KB
testcase_38 AC 137 ms
142,040 KB
testcase_39 AC 54 ms
76,288 KB
testcase_40 AC 91 ms
116,568 KB
testcase_41 AC 126 ms
124,952 KB
testcase_42 AC 140 ms
110,812 KB
testcase_43 AC 135 ms
141,892 KB
testcase_44 AC 112 ms
110,832 KB
testcase_45 AC 40 ms
59,956 KB
testcase_46 TLE -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
ans = 0
for a in A:
    ans ^= a
    
if ans:
    print("No")
    exit()

if N >= 5000:
    print("Yes")
    exit()
    
M = 8192
pre = [0] * M
pre[0] = 1
for i in range(N):
    dp = [0] * M
    for v in range(M):
        dp[v] += pre[v]
        dp[v^A[i]] += pre[v]
    for v in range(N + 1):
        dp[v] = min(dp[v], 3)
    dp, pre = pre, dp
    
print("Yes") if pre[0] > 2 else print("No")
0