結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 27 ms
9,856 KB
testcase_02 AC 30 ms
9,856 KB
testcase_03 AC 27 ms
9,856 KB
testcase_04 AC 26 ms
9,856 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 26 ms
9,856 KB
testcase_08 AC 26 ms
9,856 KB
testcase_09 AC 27 ms
9,856 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 26 ms
9,856 KB
testcase_13 AC 27 ms
9,856 KB
testcase_14 AC 27 ms
9,856 KB
testcase_15 AC 27 ms
9,856 KB
testcase_16 AC 27 ms
9,856 KB
testcase_17 AC 28 ms
9,856 KB
testcase_18 AC 27 ms
9,856 KB
testcase_19 AC 27 ms
9,856 KB
testcase_20 AC 27 ms
9,856 KB
testcase_21 AC 27 ms
9,856 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 27 ms
9,856 KB
testcase_25 AC 28 ms
9,856 KB
testcase_26 AC 27 ms
9,856 KB
testcase_27 AC 27 ms
9,856 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 27 ms
9,856 KB
testcase_31 AC 167 ms
60,056 KB
testcase_32 AC 82 ms
29,752 KB
testcase_33 AC 73 ms
26,544 KB
testcase_34 AC 125 ms
46,772 KB
testcase_35 AC 161 ms
61,356 KB
testcase_36 AC 146 ms
52,368 KB
testcase_37 AC 157 ms
58,668 KB
testcase_38 AC 92 ms
33,212 KB
testcase_39 AC 186 ms
65,576 KB
testcase_40 AC 53 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 29 ms
11,136 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 28 ms
11,136 KB
testcase_52 AC 29 ms
11,136 KB
testcase_53 AC 29 ms
11,136 KB
testcase_54 AC 29 ms
11,136 KB
testcase_55 AC 30 ms
11,136 KB
testcase_56 WA -
testcase_57 AC 28 ms
10,496 KB
testcase_58 AC 27 ms
10,112 KB
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 AC 270 ms
10,496 KB
testcase_63 AC 29 ms
10,368 KB
testcase_64 AC 29 ms
10,496 KB
testcase_65 AC 31 ms
10,112 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 = set([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