結果

問題 No.2672 Subset Xor Sum
ユーザー NPNP
提出日時 2024-03-15 22:51:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 142,176 KB
最終ジャッジ日時 2024-09-30 02:23:23
合計ジャッジ時間 5,933 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 35 ms
53,496 KB
testcase_02 AC 35 ms
52,204 KB
testcase_03 AC 37 ms
52,364 KB
testcase_04 AC 33 ms
53,252 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 37 ms
53,400 KB
testcase_08 AC 36 ms
53,200 KB
testcase_09 AC 35 ms
51,712 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 34 ms
53,116 KB
testcase_13 AC 35 ms
53,348 KB
testcase_14 AC 34 ms
53,180 KB
testcase_15 AC 34 ms
52,916 KB
testcase_16 AC 34 ms
52,488 KB
testcase_17 AC 35 ms
52,564 KB
testcase_18 AC 35 ms
53,268 KB
testcase_19 AC 34 ms
52,496 KB
testcase_20 AC 35 ms
52,756 KB
testcase_21 AC 35 ms
52,792 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 35 ms
54,172 KB
testcase_25 AC 34 ms
53,576 KB
testcase_26 AC 35 ms
53,960 KB
testcase_27 AC 34 ms
53,400 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 34 ms
52,084 KB
testcase_31 AC 137 ms
131,960 KB
testcase_32 AC 75 ms
97,300 KB
testcase_33 AC 70 ms
90,872 KB
testcase_34 AC 112 ms
111,408 KB
testcase_35 AC 134 ms
132,184 KB
testcase_36 AC 121 ms
116,520 KB
testcase_37 AC 130 ms
125,036 KB
testcase_38 AC 80 ms
100,252 KB
testcase_39 AC 144 ms
142,176 KB
testcase_40 AC 57 ms
75,580 KB
testcase_41 AC 95 ms
116,872 KB
testcase_42 AC 130 ms
124,932 KB
testcase_43 AC 115 ms
110,792 KB
testcase_44 AC 140 ms
141,780 KB
testcase_45 AC 117 ms
110,952 KB
testcase_46 AC 40 ms
60,956 KB
testcase_47 WA -
testcase_48 AC 41 ms
59,956 KB
testcase_49 AC 39 ms
59,628 KB
testcase_50 AC 40 ms
60,112 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 AC 42 ms
59,728 KB
testcase_57 WA -
testcase_58 WA -
testcase_59 AC 35 ms
52,492 KB
testcase_60 AC 38 ms
59,568 KB
testcase_61 AC 39 ms
59,144 KB
testcase_62 WA -
testcase_63 WA -
testcase_64 WA -
testcase_65 AC 39 ms
59,548 KB
testcase_66 AC 34 ms
52,316 KB
testcase_67 AC 34 ms
52,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    
    xor_all = 0
    for a in A:
        xor_all ^= a
    
    if xor_all != 0:
        print("No")
        return

    xor_cum = 0
    cnt = 0
    for a in A:
        xor_cum ^= a
        if xor_cum == xor_all:
            xor_cum = 0
            cnt += 1
    
    if cnt >= 3:
        print("Yes")
    else:
        print("No")

solve()

0