結果

問題 No.2672 Subset Xor Sum
ユーザー 2000 Ekiben2000 Ekiben
提出日時 2024-03-15 22:51:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 141,828 KB
最終ジャッジ日時 2024-03-15 22:52:07
合計ジャッジ時間 6,228 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 AC 37 ms
53,460 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 35 ms
53,460 KB
testcase_07 AC 37 ms
53,460 KB
testcase_08 AC 38 ms
53,460 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 36 ms
53,460 KB
testcase_12 AC 37 ms
53,460 KB
testcase_13 AC 36 ms
53,460 KB
testcase_14 AC 36 ms
53,460 KB
testcase_15 AC 36 ms
53,460 KB
testcase_16 AC 37 ms
53,460 KB
testcase_17 AC 37 ms
53,460 KB
testcase_18 AC 36 ms
53,460 KB
testcase_19 AC 36 ms
53,460 KB
testcase_20 AC 36 ms
53,460 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 36 ms
53,460 KB
testcase_24 AC 36 ms
53,460 KB
testcase_25 AC 36 ms
53,460 KB
testcase_26 AC 36 ms
53,460 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 36 ms
53,460 KB
testcase_30 AC 137 ms
131,700 KB
testcase_31 AC 75 ms
96,096 KB
testcase_32 AC 69 ms
90,652 KB
testcase_33 AC 114 ms
111,268 KB
testcase_34 AC 132 ms
131,704 KB
testcase_35 AC 119 ms
116,008 KB
testcase_36 AC 128 ms
124,740 KB
testcase_37 AC 78 ms
101,924 KB
testcase_38 AC 139 ms
141,828 KB
testcase_39 AC 55 ms
76,040 KB
testcase_40 AC 97 ms
116,136 KB
testcase_41 AC 128 ms
124,744 KB
testcase_42 AC 116 ms
110,504 KB
testcase_43 AC 136 ms
141,684 KB
testcase_44 AC 111 ms
110,964 KB
testcase_45 AC 39 ms
59,704 KB
testcase_46 WA -
testcase_47 AC 40 ms
59,704 KB
testcase_48 AC 41 ms
59,704 KB
testcase_49 AC 41 ms
59,704 KB
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 43 ms
59,704 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 AC 36 ms
53,460 KB
testcase_59 AC 40 ms
59,704 KB
testcase_60 AC 40 ms
59,720 KB
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 AC 42 ms
59,724 KB
testcase_65 AC 37 ms
53,460 KB
testcase_66 AC 37 ms
53,460 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