結果

問題 No.2672 Subset Xor Sum
ユーザー OhnoHirokiOhnoHiroki
提出日時 2024-03-21 00:48:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 66,660 KB
最終ジャッジ日時 2024-03-21 00:48:12
合計ジャッジ時間 7,616 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,856 KB
testcase_01 AC 29 ms
9,856 KB
testcase_02 AC 30 ms
11,008 KB
testcase_03 AC 27 ms
10,240 KB
testcase_04 AC 27 ms
10,240 KB
testcase_05 AC 28 ms
10,368 KB
testcase_06 AC 31 ms
10,368 KB
testcase_07 AC 28 ms
10,368 KB
testcase_08 AC 28 ms
10,368 KB
testcase_09 AC 28 ms
10,368 KB
testcase_10 AC 28 ms
10,368 KB
testcase_11 AC 28 ms
10,368 KB
testcase_12 AC 28 ms
10,368 KB
testcase_13 AC 28 ms
10,368 KB
testcase_14 AC 28 ms
10,368 KB
testcase_15 AC 28 ms
10,368 KB
testcase_16 AC 28 ms
10,368 KB
testcase_17 AC 28 ms
10,368 KB
testcase_18 AC 28 ms
10,368 KB
testcase_19 AC 28 ms
10,368 KB
testcase_20 AC 28 ms
10,368 KB
testcase_21 AC 27 ms
10,368 KB
testcase_22 AC 28 ms
10,368 KB
testcase_23 AC 28 ms
10,368 KB
testcase_24 AC 28 ms
10,240 KB
testcase_25 AC 27 ms
10,240 KB
testcase_26 AC 122 ms
11,008 KB
testcase_27 AC 124 ms
11,008 KB
testcase_28 AC 31 ms
11,008 KB
testcase_29 AC 30 ms
11,008 KB
testcase_30 AC 28 ms
10,368 KB
testcase_31 AC 154 ms
62,004 KB
testcase_32 AC 77 ms
29,748 KB
testcase_33 AC 70 ms
26,544 KB
testcase_34 AC 117 ms
46,768 KB
testcase_35 AC 154 ms
61,768 KB
testcase_36 AC 131 ms
52,364 KB
testcase_37 AC 145 ms
58,664 KB
testcase_38 AC 88 ms
33,208 KB
testcase_39 AC 162 ms
65,572 KB
testcase_40 AC 50 ms
18,924 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 29 ms
10,496 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 28 ms
10,496 KB
testcase_52 AC 30 ms
10,496 KB
testcase_53 AC 28 ms
10,496 KB
testcase_54 AC 28 ms
10,496 KB
testcase_55 AC 28 ms
10,496 KB
testcase_56 WA -
testcase_57 AC 32 ms
10,368 KB
testcase_58 AC 28 ms
9,984 KB
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 AC 1,538 ms
11,136 KB
testcase_63 AC 31 ms
10,240 KB
testcase_64 AC 28 ms
10,368 KB
testcase_65 AC 27 ms
9,984 KB
testcase_66 AC 26 ms
9,856 KB
testcase_67 AC 27 ms
9,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
if (0 in A):
    print("Yes")
else:
    memo = set()
    b = 0
    ans = "No"
    for i in range(N):
        ai = A[i]
        b ^= ai
        memo.update([ai ^ m for m in memo])
        memo.add(ai)
        if 0 in memo and i != N-1:
            ans = "Yes"
    if b != 0:
        print("No")
    else:
        print(ans)
0