結果

問題 No.2672 Subset Xor Sum
ユーザー Tekyla
提出日時 2024-03-21 00:51:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 284 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 61,596 KB
最終ジャッジ日時 2024-09-30 09:51:37
合計ジャッジ時間 5,326 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 29 TLE * 1 -- * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

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