結果

問題 No.2672 Subset Xor Sum
ユーザー Ekiben542Ekiben542
提出日時 2024-03-15 22:02:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 746,040 KB
最終ジャッジ日時 2024-03-15 22:02:09
合計ジャッジ時間 6,284 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
58,992 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 44 ms
59,072 KB
testcase_05 AC 44 ms
59,072 KB
testcase_06 WA -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 WA -
testcase_24 WA -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 WA -
testcase_30 MLE -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
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 #

def solve(n, a):
    MAX = 5000
    dp = [[False]*(MAX+1) for _ in range(n+1)]
    dp[0][0] = True
    for i in range(n):
        for j in range(MAX+1):
            if dp[i][j]:
                dp[i+1][j] = True
                dp[i+1][j^a[i]] = True
    return 'Yes' if dp[n][0] else 'No'

n = int(input().strip())
a = list(map(int, input().strip().split()))
print(solve(n, a))
0