結果

問題 No.2672 Subset Xor Sum
ユーザー 👑 rin204
提出日時 2024-03-15 21:30:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 142,236 KB
最終ジャッジ日時 2024-09-30 04:13:45
合計ジャッジ時間 5,838 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 66
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
x = 0
for a in A:
    x ^= a

if x != 0:
    print("No")
    exit()
A.pop()
B = []

for a in A:
    for b in B:
        a = min(a, a ^ b)
    if a == 0:
        print("Yes")
        exit()
    B.append(a)

print("No")
0