結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
9,984 KB
testcase_01 AC 24 ms
9,984 KB
testcase_02 AC 25 ms
11,008 KB
testcase_03 AC 24 ms
10,240 KB
testcase_04 AC 24 ms
10,240 KB
testcase_05 AC 24 ms
10,368 KB
testcase_06 AC 24 ms
10,368 KB
testcase_07 AC 31 ms
10,368 KB
testcase_08 AC 25 ms
10,496 KB
testcase_09 AC 33 ms
10,496 KB
testcase_10 AC 25 ms
10,496 KB
testcase_11 AC 24 ms
10,496 KB
testcase_12 AC 24 ms
10,496 KB
testcase_13 AC 24 ms
10,496 KB
testcase_14 AC 24 ms
10,496 KB
testcase_15 AC 24 ms
10,496 KB
testcase_16 AC 24 ms
10,496 KB
testcase_17 AC 25 ms
10,496 KB
testcase_18 AC 25 ms
10,496 KB
testcase_19 AC 24 ms
10,496 KB
testcase_20 AC 25 ms
10,496 KB
testcase_21 AC 26 ms
10,496 KB
testcase_22 AC 26 ms
10,496 KB
testcase_23 AC 24 ms
10,496 KB
testcase_24 AC 24 ms
10,240 KB
testcase_25 AC 25 ms
10,240 KB
testcase_26 AC 23 ms
9,984 KB
testcase_27 AC 30 ms
9,984 KB
testcase_28 AC 26 ms
11,008 KB
testcase_29 AC 26 ms
11,008 KB
testcase_30 AC 24 ms
10,368 KB
testcase_31 AC 150 ms
60,056 KB
testcase_32 AC 72 ms
29,752 KB
testcase_33 AC 79 ms
26,544 KB
testcase_34 AC 111 ms
46,772 KB
testcase_35 AC 142 ms
61,356 KB
testcase_36 AC 122 ms
52,368 KB
testcase_37 AC 161 ms
58,668 KB
testcase_38 AC 82 ms
33,212 KB
testcase_39 AC 185 ms
65,576 KB
testcase_40 AC 45 ms
18,928 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 26 ms
11,136 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 27 ms
11,136 KB
testcase_52 AC 27 ms
11,136 KB
testcase_53 AC 33 ms
11,136 KB
testcase_54 AC 25 ms
11,136 KB
testcase_55 AC 25 ms
11,136 KB
testcase_56 WA -
testcase_57 AC 25 ms
10,496 KB
testcase_58 AC 25 ms
10,240 KB
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 AC 1,321 ms
11,136 KB
testcase_63 AC 25 ms
10,496 KB
testcase_64 AC 25 ms
10,624 KB
testcase_65 AC 26 ms
10,240 KB
testcase_66 WA -
testcase_67 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
if len(set(A)) < N or (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