結果

問題 No.2672 Subset Xor Sum
ユーザー rlangevinrlangevin
提出日時 2024-03-15 21:53:06
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 447 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 81,980 KB
実行使用メモリ 280,152 KB
最終ジャッジ日時 2024-09-30 00:55:17
合計ジャッジ時間 8,082 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
67,360 KB
testcase_01 AC 44 ms
60,652 KB
testcase_02 AC 45 ms
59,784 KB
testcase_03 AC 45 ms
60,120 KB
testcase_04 AC 45 ms
60,632 KB
testcase_05 AC 44 ms
61,376 KB
testcase_06 AC 44 ms
60,572 KB
testcase_07 AC 46 ms
60,644 KB
testcase_08 AC 43 ms
59,720 KB
testcase_09 AC 45 ms
60,252 KB
testcase_10 AC 45 ms
61,024 KB
testcase_11 AC 45 ms
59,948 KB
testcase_12 AC 44 ms
59,712 KB
testcase_13 AC 45 ms
60,120 KB
testcase_14 AC 45 ms
60,384 KB
testcase_15 AC 45 ms
60,720 KB
testcase_16 AC 45 ms
60,796 KB
testcase_17 AC 44 ms
60,428 KB
testcase_18 AC 44 ms
61,072 KB
testcase_19 AC 43 ms
59,640 KB
testcase_20 AC 44 ms
60,132 KB
testcase_21 AC 46 ms
59,864 KB
testcase_22 AC 47 ms
60,544 KB
testcase_23 AC 44 ms
59,988 KB
testcase_24 AC 45 ms
59,624 KB
testcase_25 AC 42 ms
60,448 KB
testcase_26 AC 117 ms
79,292 KB
testcase_27 AC 115 ms
79,468 KB
testcase_28 AC 45 ms
60,112 KB
testcase_29 AC 44 ms
59,776 KB
testcase_30 AC 45 ms
60,088 KB
testcase_31 AC 136 ms
131,748 KB
testcase_32 AC 75 ms
95,188 KB
testcase_33 AC 70 ms
91,800 KB
testcase_34 AC 116 ms
111,336 KB
testcase_35 AC 135 ms
131,956 KB
testcase_36 AC 121 ms
116,200 KB
testcase_37 AC 127 ms
125,096 KB
testcase_38 AC 80 ms
101,052 KB
testcase_39 AC 141 ms
142,096 KB
testcase_40 AC 56 ms
76,120 KB
testcase_41 AC 95 ms
116,672 KB
testcase_42 AC 128 ms
125,224 KB
testcase_43 AC 115 ms
111,108 KB
testcase_44 AC 143 ms
142,168 KB
testcase_45 AC 116 ms
111,128 KB
testcase_46 AC 41 ms
59,488 KB
testcase_47 TLE -
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 -- -
testcase_67 -- -
権限があれば一括ダウンロードができます

ソースコード

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